#include <bits/stdc++.h>
using namespace std;
int n;
vector<long long> v;
long long check(long long x) {
  for (auto i : v)
    if (x & (i & -i)) x ^= i;
  return x;
}
void add(long long x) {
  if (x) {
    for (auto &i : v)
      if (i & (x & -x)) i ^= x;
    v.push_back(x);
  }
}
int main() {
  scanf("%d", &n);
  long long all = 0;
  for (int i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld %lld", &x, &y);
    all ^= x;
    add(check(x ^ y));
  }
  if (check(all))
    puts("1/1");
  else
    printf("%lld/%lld\n", (1LL << v.size()) - 1, 1LL << v.size());
  return 0;
}
