#include <bits/stdc++.h>
using namespace std;
const int MX = 5e5 + 5;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
int n;
long long A[MX], P[65], S;
void Guass_base() {
  memset(P, 0, sizeof(P));
  for (int i = 1; i <= n; i++) {
    for (int j = 62; j >= 0; j--) {
      if (!(A[i] >> j & 1)) continue;
      if (!P[j]) {
        P[j] = A[i];
        break;
      }
      A[i] ^= P[j];
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    long long a, b;
    scanf("%I64d%I64d", &a, &b);
    S ^= a;
    A[i] = a ^ b;
  }
  Guass_base();
  int r = 0;
  for (int i = 62; i >= 0; i--) {
    if (S >> i & 1) S ^= P[i];
    if (P[i]) r++;
  }
  if (S)
    printf("1/1\n");
  else
    printf("%I64d/%I64d\n", (1LL << r) - 1, 1LL << r);
  return 0;
}
