#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = 3.141592653589793;
const int N = 1005;
const int M = 1000005;
const int MOD = 998244353;
const double S5 = sqrt(5);
const double eps = 1e-5;
long long num[64];
int cnt;
void insert(long long w) {
  for (int i = 61; i != -1; i--) {
    if (w & (1LL << i)) {
      if (num[i]) {
        w ^= num[i];
      } else {
        num[i] = w;
        cnt++;
        return;
      }
    }
  }
}
int main() {
  int n;
  long long a, b, sum = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%I64d %I64d", &a, &b);
    sum ^= a;
    insert(a ^ b);
  }
  if (cnt == 0 && sum == 0) {
    puts("0/1");
  } else {
    int ccnt = cnt;
    insert(sum);
    if (cnt != ccnt) {
      puts("1/1");
    } else {
      printf("%I64d/%I64d\n", (1LL << cnt) - 1, (1LL << cnt));
    }
  }
  return 0;
}
