#include <bits/stdc++.h>
using namespace std;
const int maxn = 500010;
int n;
long long Num[72], ans;
long long a[maxn], b[maxn], S = 0;
void Get_base() {
  for (int i = 1; i <= n; ++i) {
    for (int j = 62; j >= 0; --j) {
      if (a[i] >> j & 1) {
        if (!Num[j]) {
          Num[j] = a[i];
          break;
        } else
          a[i] ^= Num[j];
      }
    }
  }
  return;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%I64d%I64d", &a[i], &b[i]);
  for (int i = 1; i <= n; ++i) S ^= a[i], a[i] ^= b[i];
  Get_base();
  bool flag = false;
  int cnt = 0;
  ;
  for (int i = 62; i >= 0; --i) {
    if (S >> i & 1) S ^= Num[i];
    if (Num[i]) cnt++;
  }
  if (S) {
    printf("1/1");
    return 0;
  }
  ans = 1;
  for (int i = 1; i <= cnt; ++i) ans <<= 1;
  printf("%I64d/%I64d\n", ans - 1, ans);
  return 0;
}
