#include <bits/stdc++.h>
const int N = 500000;
const int LOG = 63;
int n;
long long a[N + 9], b[N + 9];
long long base[LOG], xorv;
int cnt;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld%lld", a + i, b + i);
    xorv ^= a[i], b[i] ^= a[i];
  }
  for (int i = 1; i <= n; ++i)
    for (int j = LOG - 1; j >= 0; --j)
      if (b[i] & (1ll << j)) {
        if (!base[j]) {
          base[j] = b[i];
          break;
        } else
          b[i] ^= base[j];
      }
  for (int i = LOG - 1; i >= 0; --i)
    if (base[i]) ++cnt;
  for (int i = LOG - 1; i >= 0; --i)
    if (xorv & (1ll << i)) xorv ^= base[i];
  if (!xorv)
    printf("%lld/%lld\n", (1ll << cnt) - 1, 1ll << cnt);
  else
    puts("1/1");
  return 0;
}
