#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1000005;
long long n, tot, ans;
long long a[maxn], b[maxn], c[maxn], x[maxn];
inline long long read() {
  long long s = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') {
      f = -1;
    }
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - 48;
    c = getchar();
  }
  return s * f;
}
bool push(long long s) {
  for (long long i = 63; i >= 0; i--) {
    if ((s >> i) & 1) {
      if (x[i]) {
        s = s ^ x[i];
      } else {
        x[i] = s;
        return true;
      }
    }
  }
  return false;
}
long long q_pow(long long xx, long long t) {
  long long re = 1;
  while (t) {
    if (t % 2) {
      re = re * xx;
    }
    xx = xx * xx;
    t = t / 2;
  }
  return re;
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) {
    a[i] = read(), b[i] = read();
    c[i] = a[i] ^ b[i];
    ans ^= a[i];
  }
  for (long long i = 1; i <= n; i++) {
    if (push(c[i])) tot++;
  }
  if (push(ans)) {
    printf("1/1\n");
    return 0;
  } else {
    printf("%I64d/%I64d\n", q_pow(2, tot) - 1, q_pow(2, tot));
  }
  return 0;
}
