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