#include <bits/stdc++.h>
using namespace std;
void solve(int n) {
  vector<long long> a(n), b(n);
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  long long target = 0;
  for (int i = 0; i < n; i++) target ^= b[i], a[i] ^= b[i];
  const int bits = 60;
  int cur = 0;
  vector<int> what_bit(n);
  for (int bit = 0; bit < bits; bit++) {
    int who = -1;
    for (int i = cur; i < n; i++)
      if ((a[i] >> bit) & 1LL) who = i;
    if (who == -1) continue;
    swap(a[cur], a[who]);
    for (int i = cur + 1; i < n; i++)
      if ((a[i] >> bit) & 1LL) a[i] ^= a[cur];
    what_bit[cur] = bit;
    cur++;
  }
  for (int i = 0; i < cur; i++)
    if ((target >> what_bit[i]) & 1LL) target ^= a[i];
  if (target == 0) {
    cout << (1LL << cur) - 1 << '/' << (1LL << cur) << endl;
    return;
  } else {
    cout << "1/1" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  while (cin >> n) solve(n);
}
