#include <bits/stdc++.h>
using namespace std;
const int iinf = 1e9 + 7;
const long long linf = 1ll << 60;
const double dinf = 1e10;
void scf(int &x) {
  bool f = 0;
  x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return;
}
void scf(int &x, int &y) {
  scf(x);
  return scf(y);
}
void scf(int &x, int &y, int &z) {
  scf(x);
  scf(y);
  return scf(z);
}
const int N = 100;
int n, cnt;
long long a[N], b[N], w, ans = 1ll;
inline long long lowbit(long long i) { return i & (-i); }
int main() {
  scf(n);
  for (int i = 0; i < (n); i++) {
    long long x, y;
    scanf("%I64d%I64d", &x, &y);
    w ^= x;
    x ^= y;
    for (int j = 0; j < (cnt); j++)
      if (x & b[j]) x ^= a[j];
    if (x) a[cnt] = x, b[cnt] = lowbit(x), cnt++;
  }
  for (int i = 0; i < (cnt); i++)
    if (w & b[i]) w ^= a[i];
  if (w) {
    puts("1/1");
    return 0;
  }
  for (int i = 0; i < (cnt); i++) ans <<= 1;
  printf("%I64d/%I64d\n", ans - 1, ans);
  return 0;
}
