#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 10, mod = 1e9 + 7;
const long long inf = 1e18;
long long a[maxn], b[65], ans;
bool mark[maxn];
long long cnt = 1;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long x;
    scanf("%lld%lld", &x, &a[i]);
    ans ^= x;
    a[i] ^= x;
  }
  for (int bt = 61; bt >= 0; bt--) {
    int ind = -1;
    for (int i = 0; i < n; i++) {
      if ((((a[i]) >> (bt)) & 1) && !mark[i]) ind = i;
    }
    if (ind != -1) {
      mark[ind] = 1;
      b[bt] = ind + 1;
      for (int i = 0; i < n; i++) {
        if ((((a[i]) >> (bt)) & 1) && i != ind) a[i] ^= a[ind];
      }
    }
  }
  for (int i = 0; i < 62; i++) {
    if (b[i] > 0) {
      if ((((ans) >> (i)) & 1)) ans ^= a[b[i] - 1];
      cnt *= 2;
    }
  }
  if (ans != 0) {
    printf("1/1\n");
    return 0;
  }
  printf("%lld/%lld\n", cnt - 1, cnt);
}
