#include <bits/stdc++.h>
using namespace std;
long long int b[500100];
long long int ch[500100];
long long int p[500100];
int main() {
  long long int n, x, s = 0, cnt = 0, dem = 0;
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (long long int i = 1; i <= n; i++) {
    cin >> x >> b[i];
    b[i] ^= x;
    s ^= x;
  }
  b[++n] = s;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = 0; j < cnt; j++) {
      if (b[i] & p[j]) {
        b[i] ^= ch[j];
      }
    }
    if (b[i]) {
      ch[cnt] = b[i];
      dem++;
      p[cnt++] = b[i] & (-b[i]);
    }
  }
  if (b[n]) {
    cout << "1/1" << endl;
    return 0;
  }
  cout << (1LL << dem) - 1 << "/" << (1LL << dem);
}
