#include <bits/stdc++.h>
using namespace std;
long n,vitri,k,t=2;
int ucln(int a, int b)
{
    return (b==0)? a: ucln(b,a%b);
}
struct T
{
    double ketqua;
    double tuso;
    double mauso;
    bool operator<(const T &x)const{return ketqua<x.ketqua;}
}a[1000000];
int main()
{
	freopen ("sxps.inp","r",stdin);
	freopen ("sxps.out","w",stdout);
	cin>>n>>k;
	for (int i=1;i<n;i++)
    {
        for (int j=i+1;j<=n;j++)
        {
            a[t].ketqua=(double)(i)/double(j);
            a[t].tuso=i;
            a[t].mauso=j;
            t++;
        }
    }
    a[t].ketqua=1;a[t].mauso=1;a[t].tuso=1;t++;
    a[1].ketqua=0;a[1].mauso=1;a[1].tuso=0;
    sort(a+1,a+t);
    for (int i=2;i<t;i++)
    {
        if (a[i].ketqua!=a[i-1].ketqua)
            k--;
        if (k==1)
        {
            vitri=i;
            break;
        }
    }
    if (k>1)
    {
        cout<<-1;
    }
    else
    {
        int q=ucln(a[vitri].tuso,a[vitri].mauso);
        cout<<a[vitri].tuso/q<<"/"<<a[vitri].mauso/q;
    }
}
