#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const int oo = 1 << 30;
const long long loo = 1ll << 62;
const int mods = 998244353;
const int MAXN = 2000005;
const int INF = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
long long bse[60], num = 0;
void insert(long long x) {
  for (long long i = 59; i >= 0; i--)
    if ((x >> i) & 1) {
      if (!bse[i]) {
        num++, bse[i] = x;
        break;
      } else
        x ^= bse[i];
    }
}
long long query(long long x) {
  for (long long i = 59; i >= 0; i--)
    if ((x >> i) & 1) x ^= bse[i];
  return x;
}
signed main() {
  long long n = read(), s = 0;
  for (long long i = 1, x, y; i <= n; i++)
    x = read(), y = read(), s ^= x, insert(y ^ x);
  if (!query(s))
    printf("%lld/%lld\n", (1ll << num) - 1, 1ll << num);
  else
    puts("1/1");
  return 0;
}
