#include <bits/stdc++.h>
using namespace std;
const int dd = 1e5 + 7;
const long long infi = 1e9 + 7;
const long long inf = 1e18;
int main() {
  if (0) {
    freopen("input", "r", stdin);
    freopen("output", "w", stdout);
  }
  if (0 == 012) {
    freopen(
        ""
        ".in",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  }
  long long s = 0;
  int n;
  cin >> n;
  vector<long long> B(n), C(n + 1);
  long long e = 0;
  for (long long i = 0; i < (long long)(n); i++) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    s ^= a;
    B[i] = a ^ b;
  }
  for (long long i = 0; i < (long long)(n + 1); i++) {
    C[i] = i;
  }
  long long base = 0;
  B.push_back(s);
  int nw = 0;
  for (long long i = 0; i < (long long)(60); i++) {
    bool ok = 0;
    for (int j = nw; j <= n; j++) {
      if ((1ll << i) & B[j]) {
        ok = 1;
        swap(B[nw], B[j]);
        swap(C[nw], C[j]);
        break;
      }
    }
    if (!ok) {
      continue;
    }
    for (long long j = 0; j < (long long)(n + 1); j++) {
      if (j != nw) {
        if ((1ll << i) & B[j]) {
          B[j] ^= B[nw];
        }
      }
    }
    nw++;
    base++;
  }
  for (long long i = 0; i < (long long)(n + 1); i++) {
    if (C[i] == n) {
      if (B[i]) {
        cout << "1/1";
        return 0;
      }
    }
  }
  cout << (1ll << base) - 1 << '/' << (1ll << base);
}
