#include <bits/stdc++.h>
using namespace std;
bool flag;
long long bin[60 + 5], a, b, res;
int n, cnt;
void insert(long long x) {
  for (int i = 60; i >= 0; i--)
    if (x >> i & 1) {
      if (!bin[i]) {
        bin[i] = x, cnt++;
        return;
      }
      x ^= bin[i];
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &a, &b);
    res ^= a, insert(a ^ b);
  }
  for (int i = 60; i >= 0; i--)
    if (res >> i & 1) res ^= bin[i];
  if (res)
    printf("1/1");
  else
    printf("%I64d/%I64d", ((long long)1 << cnt) - 1, (long long)1 << cnt);
  return 0;
}
