#include <bits/stdc++.h>
using namespace std;
const int maxn = 500010;
int n, m;
long long S, v[maxn];
inline long long rd() {
  long long ret = 0, f = 1;
  char gc = getchar();
  while (gc < '0' || gc > '9') {
    if (gc == '-') f = -f;
    gc = getchar();
  }
  while (gc >= '0' && gc <= '9') ret = ret * 10 + (gc ^ '0'), gc = getchar();
  return ret * f;
}
int main() {
  n = rd();
  int i, j;
  long long a, b;
  for (i = 0; i < n; i++) a = rd(), b = rd(), S ^= a, v[i] = a ^ b;
  for (i = 60; i >= 0; i--) {
    for (j = m; j < n; j++)
      if ((v[j] >> i) & 1) break;
    if (!((v[j] >> i) & 1)) continue;
    if (m != j) swap(v[m], v[j]);
    for (j = 0; j < n; j++)
      if (j != m && ((v[j] >> i) & 1)) v[j] ^= v[m];
    m++;
  }
  for (i = 0; i < m; i++)
    if ((S ^ v[i]) < S) S ^= v[i];
  if (S)
    puts("1/1");
  else
    printf("%lld/%lld", (1ll << m) - 1, 1ll << m);
  return 0;
}
