#include <bits/stdc++.h>
using namespace std;
const int M = 5e5 + 5;
int n;
long long A[M], ned, D[65];
bool Addele(long long x) {
  for (int i = 59; i >= 0; i--) {
    if ((x >> i) & 1) {
      if (!D[i]) return D[i] = x;
      x ^= D[i];
    }
  }
  return false;
}
void Solve() {
  long long siz = 1;
  for (int i = 1; i <= n; i++) {
    long long b;
    scanf("%lld%lld", &A[i], &b);
    A[i] ^= b;
    ned ^= b;
    if (Addele(A[i])) siz <<= 1;
  }
  if (Addele(ned)) {
    puts("1/1");
    return;
  }
  printf("%lld/%lld\n", siz - 1, siz);
}
int main() {
  scanf("%d", &n);
  Solve();
  return 0;
}
