#include <bits/stdc++.h>
long long n, x, ans, base[100], tot, tmp;
bool ins(long long x) {
  for (long long j = 62; j >= 0; j--) {
    if (!((x >> j) & 1)) continue;
    if (!base[j]) {
      base[j] = x;
      tot++;
      return 1;
    }
    x ^= base[j];
  }
  return 0;
}
signed main() {
  scanf("%lld", &n);
  for (long long i = 1, x, y; i <= n; i++) {
    scanf("%lld%lld", &x, &y);
    tmp ^= x;
    ins(x ^ y);
  }
  if (ins(tmp))
    puts("1/1");
  else
    printf("%lld/%lld\n", (1ll << tot) - 1, 1ll << tot);
}
