#include <bits/stdc++.h>
using namespace std;
const int maxn = 500005;
long long f[maxn], a[maxn], b[maxn], s[maxn];
struct Linear_basis {
  long long p[70];
  int cnt, flag;
  void init() {
    memset(p, 0, sizeof(p));
    cnt = 0;
    flag = 1;
  }
  void Insert(long long x) {
    for (int i = 63; i >= 0; i--) {
      if ((x >> i) & 1) {
        if (!p[i]) {
          p[i] = x;
          break;
        }
        x ^= p[i];
      }
    }
    if (x > 0)
      cnt++;
    else if (x == 0)
      flag = 0;
  }
  long long check(long long x) {
    for (int i = 63; i >= 0; i--) {
      if ((x >> i) & 1) {
        x ^= p[i];
      }
    }
    return x;
  }
} sol;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &a[i], &b[i]);
    f[i] = a[i] ^ b[i];
    sol.Insert(f[i]);
  }
  for (int i = 1; i <= n; i++) s[i] = s[i - 1] ^ a[i];
  if (sol.check(s[n]))
    printf("1/1\n");
  else {
    long long ans = 1ll << sol.cnt;
    printf("%lld/%lld\n", ans - 1ll, ans);
  }
  return 0;
}
