#include <bits/stdc++.h>
using namespace std;
int N;
long long S;
long long A[500010], B[500010], C[500010];
vector<long long> X;
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%lld %lld", &A[i], &B[i]);
  }
  for (int i = 0; i < N; i++) {
    S ^= A[i];
    C[i] = A[i] ^ B[i];
  }
  while (1) {
    long long mx = 0;
    for (int i = 0; i < N; i++) {
      mx = max(mx, C[i]);
    }
    if (!mx) break;
    X.push_back(mx);
    for (int i = 0; i < N; i++) {
      if ((mx ^ C[i]) < C[i]) C[i] ^= mx;
    }
  }
  int pos = 0;
  for (int i = 62; i >= 0; i--) {
    if (S & (1LL << i)) {
      while (pos < X.size()) {
        if (X[pos] < (1LL << (i + 1)) && (X[pos] & (1LL << i))) {
          break;
        }
        pos++;
      }
      if (pos == X.size()) {
        printf("1/1");
        return 0;
      }
      S ^= X[pos++];
    }
  }
  printf("%lld/%lld", (1LL << X.size()) - 1, (1LL << X.size()));
}
