#include <bits/stdc++.h>
using namespace std;
const int N = 500000 + 5;
int n;
long long a, b, sum, bin[65];
struct base {
  long long a[65];
  void insert(long long x) {
    for (int i = 63; i >= 0; i--)
      if (x & bin[i]) {
        if (!a[i]) {
          a[i] = x;
          break;
        } else
          x ^= a[i];
      }
  }
  bool find(long long x) {
    for (int i = 63; i >= 0; i--)
      if (x & bin[i]) x ^= a[i];
    return !x;
  }
  int size() {
    int cnt = 0;
    for (int i = 63; i >= 0; i--)
      if (a[i]) ++cnt;
    return cnt;
  }
} B;
void work() {
  scanf("%d", &n);
  bin[0] = 1;
  for (int i = 1; i < 64; i++) bin[i] = (bin[i - 1] << 1);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &a, &b);
    B.insert(a ^ b);
    sum ^= a;
  }
  if (!B.find(sum))
    puts("1/1");
  else {
    int cnt = B.size();
    printf("%I64d/%I64d\n", bin[cnt] - 1, bin[cnt]);
  }
}
int main() {
  work();
  return 0;
}
