#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long mpow(long long a, long long b) {
  if (b == 0) return 1;
  long long t1 = mpow(a, b / 2);
  t1 *= t1;
  t1 %= MOD;
  if (b % 2) t1 *= a;
  t1 %= MOD;
  return t1;
}
void solve() {
  long long n;
  cin >> n;
  bitset<64> a[n];
  long long s = 0;
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < 64; j++) a[i][j] = 0;
  for (long long i = 0; i < n; i++) {
    long long t1, t2;
    cin >> t1 >> t2;
    s ^= t1;
    t2 ^= t1;
    for (long long j = 0; j < 64; j++) {
      if (!t2) break;
      if (t2 % 2) {
        a[i][j] = 1;
      }
      t2 /= 2;
    }
  }
  long long in = 0;
  for (long long i = 0; i < 64; i++) {
    bool bo = 0;
    for (long long j = in; j < n; j++) {
      if (a[j][i] == 1) {
        bo = 1;
        if (j != in) swap(a[j], a[in]);
        break;
      }
    }
    if (!bo & s % 2) {
      cout << "1/1"
           << "\n";
      return;
    } else if (bo) {
      if (s % 2)
        for (long long k = i; k < 64; k++) {
          if (a[in][k] == 1) {
            s ^= (((long long)1) << (k - i));
          }
        }
      for (long long j = in + 1; j < n; j++) {
        if (a[j][i] == 1) {
          a[j] ^= a[in];
        }
      }
      in++;
    }
    s /= 2;
  }
  long long temp = (long long)1 << in;
  cout << (temp - 1) << "/" << temp << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  for (long long i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
