#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
long long a[500100], b[500100];
long long p[100], q[100];
int n, m;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    b[i] = read();
    a[n + 1] ^= a[i];
    a[i] ^= b[i];
  }
  for (int i = 1; i <= n + 1; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i] & q[j]) {
        a[i] ^= p[j];
      }
    }
    if (a[i]) {
      p[++m] = a[i];
      q[m] = (a[i] & (-a[i]));
    }
  }
  if (a[n + 1])
    puts("1/1");
  else
    printf("%I64d/%I64d\n", (1ll << m) - 1, (1ll << m));
  return 0;
}
