n;g(a,b,e,f){b+f>n?:g(a,b,a+e,b+f)|printf("%d/%d\n",a+e,b+f)|g(a+e,b+f,e,f);}main(){puts("0/1");g(0,1,1,scanf("%d",&n));puts("1/1");}