#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 7;
long long a[maxn], b[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    a[i] ^= b[i], b[i] ^= b[i - 1];
  }
  vector<long long> linbs;
  for (int i = 1; i <= n; i++) {
    long long temp = a[i];
    for (auto &e : linbs) temp = min(temp, temp ^ e);
    if (temp) {
      for (auto &e : linbs) e = min(e, e ^ temp);
      linbs.push_back(temp);
    }
  }
  for (auto &e : linbs) b[n] = min(b[n], b[n] ^ e);
  if (b[n])
    cout << 1 << "/" << 1 << endl;
  else {
    int sz = linbs.size();
    long long t1 = 1ll << sz, t2 = t1 - 1;
    cout << t2 << "/" << t1 << endl;
  }
  return 0;
}
