#include <bits/stdc++.h>
using namespace std;
int n, c;
long long a, b, sum, p[64];
void ins(long long x) {
  for (int i = 63; ~i; i--)
    if ((x >> i) & 1) {
      if (!p[i]) {
        p[i] = x;
        return;
      }
      x ^= p[i];
    }
  c++;
}
bool run(long long x) {
  for (int i = 63; ~i; i--)
    if ((x >> i) & 1) x ^= p[i];
  return x;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    long long a, b;
    scanf("%lld %lld", &a, &b);
    sum ^= a;
    ins(a ^ b);
  }
  if (run(sum))
    puts("1/1");
  else {
    long long x = 1LL << (n - c);
    printf("%lld/%lld", x - 1, x);
  }
}
