#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
const double PI = acos(-1.0);
const long long mod = 1e9 + 7;
long long po(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  } else {
    return gcd(b % a, a);
  }
}
int n;
long long p[61];
bool insert(long long x) {
  for (int i = 61; i >= 0; i--) {
    if (x >> i & 1) {
      if (p[i]) {
        x ^= p[i];
      } else {
        p[i] = x;
        return true;
      }
    }
  }
  return false;
}
void solve() {
  scanf("%d", &(n));
  long long S = 0;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    S ^= a;
    b ^= a;
    cnt += insert(b);
  }
  bool res = insert(S);
  if (res) {
    puts("1/1");
  } else {
    printf("%lld/%lld", (1LL << cnt) - 1, (1LL << cnt));
  }
}
int main() {
  solve();
  return 0;
}
