#include <bits/stdc++.h>
using namespace std;
mt19937 rnd;
long long rand(long long a) { return (rnd() % a + a) % a; }
const long long inf = 1e9 + 2;
const long long max_n = 5e5 + 3;
long long n;
bitset<max_n> b[64];
long long gauss() {
  long long id = 60;
  for (long long i = 0; i < n; ++i) {
    for (long long tmp = id; tmp >= 0; --tmp) {
      if (b[tmp][i]) {
        swap(b[tmp], b[id]);
        break;
      }
    }
    if (b[id][i]) {
      for (long long k = 0; k < 60; ++k) {
        if (k != id && b[k][i]) {
          b[k] ^= b[id];
        }
      }
      --id;
      if (id < 0) break;
    }
  }
  for (long long i = id; i >= 0; --i) {
    if (b[i][n]) return -1;
  }
  return n - (60 - id);
}
void run() {
  cin >> n;
  long long sum = 0;
  for (long long i = 0; i < n; ++i) {
    long long a1, a2;
    cin >> a1 >> a2;
    sum ^= a1;
    a1 ^= a2;
    for (long long j = 0; j < 60; ++j) b[j][i] = (a1 >> j & 1);
  }
  for (long long i = 0; i < 60; ++i) b[i][n] = (sum >> i & 1);
  long long tmp = gauss();
  if (tmp == -1)
    cout << "1/1" << endl;
  else {
    long long res = 1;
    for (long long i = 0; i < n - tmp; ++i) res *= 2;
    cout << res - 1 << "/" << res << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  long long t = 1;
  while (t--) run();
}
