text: #include <cstdio>
  using namespace std;
  typedef long long LL;
  const LL a[205][2] = {{0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 6}, {0, 7}, {0, 8}, {0, 9}, {0, 10}, {1, 1}, {1, 4}, {1, 9}, {1, 16}, {1, 25}, {1, 36}, {1, 49}, {1, 64}, {1, 81}, {1, 100}, {1, 1}, {8, 8}, {11, 27}, {14, 64}, {17, 125}, {20, 216}, {23, 343}, {26, 512}, {29, 729}, {32, 1000}, {1, 1}, {16, 16}, {81, 81}, {131, 256}, {193, 625}, {267, 1296}, {353, 2401}, {451, 4096}, {561, 6561}, {683, 10000}, {1, 1}, {32, 32}, {243, 243}, {1024, 1024}, {1829, 3125}, {2974, 7776}, {4519, 16807}, {6524, 32768}, {9049, 59049}, {12154, 100000}, {1, 1}, {64, 64}, {729, 729}, {4096, 4096}, {15625, 15625}, {29849, 46656}, {52113, 117649}, {84997, 262144}, {131441, 531441}, {194745, 1000000}, {1, 1}, {128, 128}, {2187, 2187}, {16384, 16384}, {78125, 78125}, {279936, 279936}, {561399, 823543}, {1034270, 2097152}, {1782969, 4782969}, {2913756, 10000000}, {1, 1}, {256, 256}, {6561, 6561}, {65536, 65536}, {390625, 390625}, {1679616, 1679616}, {5764801, 5764801}, {11994247, 16777216}, {23046721, 43046721}, {41538487, 100000000}, {1, 1}, {512, 512}, {19683, 19683}, {262144, 262144}, {1953125, 1953125}, {10077696, 10077696}, {40353607, 40353607}, {134217728, 134217728}, {287420489, 387420489}, {571282238, 1000000000}, {1, 1}, {1024, 1024}, {59049, 59049}, {1048576, 1048576}, {9765625, 9765625}, {60466176, 60466176}, {282475249, 282475249}, {1073741824, 1073741824}, {3486784401, 3486784401}, {7642052309, 10000000000}};
  int T;
  int n, k;
  int main()
  {
      scanf("%d", &T);
      while (T--)
      {
          scanf("%d%d", &n, &k);
          int cnt = (n - 1) * 10 + k;
          LL xx = a[cnt][0];
          LL yy = a[cnt][1];
          printf("%lld/%lld\n", xx, yy);
      }
      return 0;
  }