#include <bits/stdc++.h>
using namespace std;
long long c[500010];
long long p[110], q[110];
int len;
int main() {
  int n;
  scanf("%d", &n);
  long long S = 0;
  for (int i = 1; i <= n; i++) {
    long long a, b;
    scanf("%I64d %I64d", &a, &b);
    c[i] = a ^ b;
    S ^= a;
  }
  c[n + 1] = S;
  for (int i = 1; i <= n + 1; i++) {
    for (int j = 1; j <= len; j++)
      if (p[j] & c[i]) c[i] ^= q[j];
    if (c[i]) {
      q[++len] = c[i];
      p[len] = c[i] & (-c[i]);
    }
  }
  if (c[n + 1]) {
    printf("1/1\n");
    return 0;
  }
  printf("%I64d/%I64d\n", (1ll << len) - 1, (1ll << len));
  return 0;
}
