#include <bits/stdc++.h>
using namespace std;
struct __timestamper {};
int main() {
  int n;
  scanf("%d", &n);
  vector<long long> v(n);
  long long need = 0;
  for (int i = 0; i < n; i++) {
    long long a, b;
    scanf("%lld %lld\n", &a, &b);
    need ^= a;
    v[i] = a ^ b;
  }
  v.push_back(need);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (v[i] == 0) continue;
    cnt++;
    long long bit = v[i] & ~(v[i] - 1);
    for (int j = i + 1; j <= n; j++) {
      if (v[j] & bit) {
        v[j] ^= v[i];
      }
    }
  }
  if (v[n] == 0) {
    printf("%lld/%lld\n", (1LL << cnt) - 1, (1LL << cnt));
  } else {
    printf("1/1\n");
  }
  return 0;
}
