#include <bits/stdc++.h>

using namespace std;
ifstream f1("sxps.inp");
ofstream f2("sxps.out");

int x[1000000];
 int y[1000000];
int ucln(int a,int b)
{while (b>0)
{ int r=a%b;
  a=b;
  b=r;
}
return a;
}
int main() {
   	
   	int d=2,n,k,i,j;
   	x[1]=0; y[1]=1;
   	f1>>n>>k;
   	for (i=1;i<n;i++)
   	  {for (j=i+1;j<=n;j++)
   	   if (ucln(i,j)==1)
   	   {x[d]=i; y[d]=j; d++;
		  }}
		  x[d]=1; y[d]=1;
   for (int i = 1; i < d; i++)
   {
       for (int j = i+1; j <=d; j++)
       {
           if (float(x[i])/float(y[i]) > float(x[j])/float(y[j]))
           {
               int tg = x[i]; x[i] = x[j]; x[j] = tg;
               tg = y[i]; y[i] = y[j]; y[j] = tg;
           }
       }}
       f2<<x[k]<<"/"<<y[k];
	return 0;
}
