#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
void precalc() {}
const int maxn = 5e5 + 10;
int n;
long long _a[maxn], _b[maxn];
bool read() {
  if (scanf("%d", &n) < 1) {
    return false;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%I64d %I64d", &_a[i], &_b[i]);
  }
  return true;
}
long long a[maxn];
long long b;
const int k = 60;
void solve() {
  b = 0;
  for (int i = 0; i < n; ++i) {
    b ^= _a[i];
    a[i] = (_a[i] ^ _b[i]);
  }
  a[n] = b;
  int rk = 0;
  for (int i = 0; i < k; ++i) {
    bool fnd = false;
    for (int j = i; j < n; ++j) {
      if ((a[j] >> i) & 1) {
        swap(a[i], a[j]);
        fnd = true;
        break;
      }
    }
    if (!fnd) {
      continue;
    }
    ++rk;
    for (int j = i + 1; j <= n; ++j) {
      if ((a[j] >> i) & 1) {
        a[j] ^= a[i];
      }
    }
  }
  if (a[n] != 0) {
    printf("1/1\n");
    return;
  }
  printf("%I64d/%I64d\n", (1ll << rk) - 1, (1ll << rk));
}
int main() {
  srand(rdtsc());
  precalc();
  while (true) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
