#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
long long base[105];
bool insert(long long x) {
  for (int i = 60; i >= 0; i--)
    if (x >> i & 1) {
      if (base[i])
        x ^= base[i];
      else {
        base[i] = x;
        return 1;
      }
    }
  return 0;
}
long long S;
int main() {
  int n;
  scanf("%d", &n);
  long long a, b;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld%lld", &a, &b);
    if (insert(a ^ b)) cnt++;
    S ^= a;
  }
  if (insert(S))
    puts("1/1");
  else
    cout << (1LL << cnt) - 1 << '/' << (1LL << cnt);
}
