intmain(){ int a, b, t = 0; while (~scanf("%d%d", &a, &b)) { if (t++) { puts(""); } double x = double(a) / b, pre = inf; for (int i = 1; i <= b; ++i) { int s = floor(i * x + 0.5); double cur = fabs(double(s) / i - x); if (cur < pre) { pre = cur; printf("%d/%d\n", s, i); } } } return0; }