#include <bits/stdc++.h>
using namespace std;
long long p[63];
int cnt = 0;
int ins(long long x) {
  for (int i = 62; i >= 0; --i) {
    if (x & (1ll << i)) {
      if (p[i])
        x ^= p[i];
      else {
        p[i] = x;
        ++cnt;
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  int n;
  scanf("%d", &n);
  long long sum = 0;
  for (int i = 1; i <= n; ++i) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    sum ^= a;
    ins(a ^ b);
  }
  if (ins(sum))
    printf("1/1\n");
  else {
    printf("%lld/%lld\n", (1ll << cnt) - 1, 1ll << cnt);
  }
  return 0;
}
