#include <bits/stdc++.h>
using namespace std;
const long long kMaxN = 500050;
long long n;
bitset<kMaxN> x[60];
long long a, b, s;
int main() {
  scanf("%lld", &n);
  for (long long i = 0; i < n; i++) {
    scanf("%lld%lld", &a, &b);
    s ^= a, a ^= b;
    for (long long j = 0; j < 60; j++) x[j][i] = (a >> j & 1);
  }
  for (long long i = 0; i < 60; i++) x[i][n] = (s >> i & 1);
  long long tmp = 0;
  long long cnt = 0;
  for (long long i = 0, j = 0; i < n && j < 60; i++) {
    long long mx = j;
    tmp++;
    for (long long k = j; k < 60; k++) {
      if (x[k][i]) mx = k;
    }
    if (!x[mx][i]) {
      cnt++;
      continue;
    } else {
      swap(x[j], x[mx]);
      for (long long k = j + 1; k < 60; k++)
        if (x[k][i]) x[k] ^= x[j];
      j++;
    }
  }
  long long t = 60;
  for (long long i = 0; i < 60; i++) {
    bool has = 0;
    for (long long j = 0; j < n; j++) has |= x[i][j];
    if (!has) {
      if (x[i][n])
        return 0 * printf("1/1\n");
      else
        t--;
    }
  }
  printf("%lld/%lld", (1LL << (tmp - cnt)) - 1, (1LL << (tmp - cnt)));
  return 0;
}
