#include <bits/stdc++.h>
using namespace std;
const int M = 500001;
int n, tot;
long long A[M], B[M], C[M], t, d[61];
bool add(long long x) {
  for (int i = 60; i >= 0; i--) {
    if (x & (1ll << i)) {
      if (!d[i]) {
        d[i] = x;
        return 1;
      }
      x ^= d[i];
    }
  }
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld%lld", &A[i], &B[i]);
  for (int i = 1; i <= n; i++) t ^= A[i], C[i] = A[i] ^ B[i];
  for (int i = 1; i <= n; i++)
    if (add(C[i])) tot++;
  if (add(t)) {
    puts("1/1");
    return 0;
  }
  long long ans = 1;
  for (int i = 1; i <= tot; i++) ans *= 2;
  printf("%lld/%lld\n", ans - 1, ans);
}
