#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 11;
const double EPS = 1e-7;
const long long MOD = 10086;
unsigned int SEED = 17;
const long long INF = 1ll << 60;
long long read() {
  long long x = 0, f = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long b[66];
int cal(int n, long long a[]) {
  memset(b, 0, sizeof b);
  int cnt = 0;
  for (register int i = 1; i <= n; i++) {
    for (register int j = 62; j >= 0; j--) {
      if (a[i] >> j & 1) {
        if (b[j])
          a[i] ^= b[j];
        else {
          b[j] = a[i];
          for (register int k = j - 1; k >= 0; k--)
            if (b[k] && (b[j] >> k & 1)) b[j] ^= b[k];
          for (register int k = j + 1; k <= 62; k++)
            if (b[k] >> j & 1) b[k] ^= b[j];
          break;
        }
      }
    }
  }
  for (register int i = 0; i <= 62; i++)
    if (b[i]) cnt++;
  return cnt;
}
long long A[MAXN], B[MAXN], C[MAXN], n;
int main() {
  while (cin >> n) {
    for (register int i = 1; i <= n; i++) {
      A[i] = read();
      B[i] = read();
    }
    long long S = 0;
    for (register int i = 1; i <= n; i++) S ^= A[i], C[i] = A[i] ^ B[i];
    int cnt = cal(n, C);
    for (register int i = 0; i <= 62; i++)
      if (S >> i & 1) S ^= b[i];
    if (S) {
      printf("1/1\n");
    } else {
      long long ans = 1ll << cnt;
      printf("%lld/%lld\n", ans - 1, ans);
    }
  }
  return 0;
}
