#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x;
}
long long dat[63];
inline int insert(long long x) {
  for (int j = 62; j >= 0; j--) {
    if (!(x >> j) & 1) continue;
    if (!dat[j]) {
      dat[j] = x;
      return true;
    } else
      x = x ^ dat[j];
  }
  return false;
}
int main() {
  long long sum = 0;
  int n = read(), tot = 0;
  for (int i = 1; i <= n; i++) {
    long long x = read(), y = read();
    if (insert(x ^ y)) ++tot;
    sum ^= x;
  }
  if (insert(sum))
    puts("1/1");
  else
    printf("%lld/%lld", (1LL << tot) - 1, 1LL << tot);
  return 0;
}
