#include <bits/stdc++.h>
using namespace std;
long long a[500005], d[100];
bool in(long long x) {
  for (int i = 60; i >= 0; --i)
    if ((1ll << i) & x) {
      if (!d[i]) {
        d[i] = x;
        return 1;
      } else
        x ^= d[i];
    }
  return 0;
}
int main() {
  long long x, y, sum = 0;
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld%lld", &x, &y);
    sum ^= x;
    a[i] = x ^ y;
  }
  int len = 0;
  for (int i = 1; i <= n; ++i) len += in(a[i]);
  if (in(sum))
    printf("1/1");
  else
    printf("%lld/%lld", (1ll << len) - 1, 1ll << len);
}
