#include <bits/stdc++.h>
using namespace std;
int N;
long long a[500010], b[500010], c[500010];
long long p[65], S;
inline long long rd() {
  register long long ret = 0ll, f_f = 1ll;
  register char c = std::getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f_f = -1ll;
    c = std::getchar();
  }
  while (c >= '0' && c <= '9')
    ret = (ret << 1ll) + (ret << 3ll) + c - '0', c = std::getchar();
  return ret * f_f;
}
inline bool Update_LinearBasis(register long long x) {
  for (register long long i = 62; i >= 0; i--)
    if ((x >> i) & 1ll)
      if (p[i])
        x ^= p[i];
      else {
        p[i] = x;
        return true;
      }
  return false;
}
int main() {
  N = (int)rd();
  for (register int i = 1; i <= N; i++) {
    a[i] = rd(), b[i] = rd();
    S ^= a[i], c[i] = a[i] ^ b[i];
    Update_LinearBasis(c[i]);
  }
  register long long cnt = 0ll;
  for (register long long i = 62; i >= 0; i--)
    if (p[i]) cnt++;
  if (Update_LinearBasis(S)) return puts("1/1"), 0;
  printf("%lld/%lld\n", (1ll << cnt) - 1ll, (1ll << cnt));
  return 0;
}
