#include <bits/stdc++.h>
using namespace std;
int n, tot;
long long a[500005], b[500005], l[500005];
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
inline void print(int x) {
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
int main() {
  n = read();
  long long S = 0;
  for (int i = 1; i <= n; i++) {
    long long x = read(), y = read();
    S ^= x, a[i] = (x ^ y);
  }
  a[++n] = S;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= tot; j++)
      if (a[i] & l[j]) a[i] ^= b[j];
    if (a[i]) b[++tot] = a[i], l[tot] = (a[i] & -a[i]);
  }
  a[n] ? puts("1/1") : printf("%lld/%lld\n", (1ll << tot) - 1, 1ll << tot);
  return 0;
}
