#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 7;
int n, tot = 0;
long long a[maxn], b[maxn], c[maxn], x[maxn], ans = 0;
bool push(long long s) {
  for (int i = 63; i >= 0; i--) {
    if ((s >> i) & 1) {
      if (x[i]) {
        s = s ^ x[i];
      } else {
        x[i] = s;
        return true;
      }
    }
  }
  return false;
}
long long q_pow(long long xx, long long t) {
  long long re = 1;
  while (t) {
    if (t % 2) {
      re = re * xx;
    }
    xx = xx * xx;
    t = t / 2;
  }
  return re;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &a[i], &b[i]);
    c[i] = a[i] ^ b[i];
    ans ^= a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (push(c[i])) tot++;
  }
  if (push(ans)) {
    printf("1/1\n");
    return 0;
  } else {
    printf("%I64d/%I64d\n", q_pow(2, tot) - 1, q_pow(2, tot));
  }
  return 0;
}
