#include <bits/stdc++.h>
using namespace std;
inline long long readLL() {
  long long n = 0;
  int ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) n = n * 10 + ch - '0', ch = getchar();
  return n;
}
const int MAX_N = 500000 + 3, MAX_LOG_V = 61;
int n;
long long a[MAX_N], b[MAX_LOG_V];
int main() {
  n = readLL();
  long long v = 0;
  for (int i = 0; i < n; ++i) {
    a[i] = readLL(), v ^= a[i];
    a[i] ^= readLL();
  }
  int cnt = 0;
  for (int i = 0; i < n; ++i)
    for (int j = MAX_LOG_V - 1; j >= 0; --j)
      if (a[i] >> j & 1) {
        if (b[j])
          a[i] ^= b[j];
        else {
          b[j] = a[i];
          for (int k = j - 1; k >= 0; --k)
            if (b[k] && (b[j] >> k & 1)) b[j] ^= b[k];
          for (int k = j + 1; k < MAX_LOG_V; ++k)
            if (b[k] >> j & 1) b[k] ^= b[j];
          ++cnt;
          break;
        }
      }
  long long nowV = 0;
  for (int i = MAX_LOG_V - 1; i >= 0; --i)
    if ((v >> i & 1) && !(nowV >> i & 1)) nowV ^= b[i];
  if (nowV != v)
    puts("1/1");
  else
    printf("%lld/%lld", (1LL << cnt) - 1, 1LL << cnt);
  return 0;
}
