#include <bits/stdc++.h>
using namespace std;
const int INF = 1e8;
const int MAX_BASE = 62;
const int N = 5e5 + 5;
long long a[N], aa[N], a2[2], b[63];
long long all = 0;
int cnt = 0;
void cal(long long a[], long long b[], int n) {
  for (int i = 1; i <= n; ++i)
    for (int j = MAX_BASE; j >= 0; --j)
      if (a[i] >> j & 1) {
        if (b[j])
          a[i] ^= b[j];
        else {
          cnt++;
          b[j] = a[i];
          for (int k = j - 1; k >= 0; --k)
            if (b[k] && (b[j] >> k & 1)) b[j] ^= b[k];
          for (int k = j + 1; k <= MAX_BASE; ++k)
            if (b[k] >> j & 1) b[k] ^= b[j];
          break;
        }
      }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &a[i], &aa[i]);
    all ^= a[i];
    a[i] ^= aa[i];
  }
  cal(a, b, n);
  int tmp = cnt;
  a2[1] = all;
  cal(a2, b, 1);
  if (tmp != cnt) {
    printf("1/1\n");
    return 0;
  }
  printf("%I64d/%I64d\n", ((long long)1 << cnt) - 1, (long long)1 << cnt);
  return 0;
}
