#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 17;
int n;
long long a[N], b[N], c[N], sum;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &a[i], &b[i]);
    sum = sum ^ a[i];
    c[i] = a[i] ^ b[i];
  }
  long long bit = 1LL << 60;
  for (int i = 60, j = 1; i + 1; i--, bit >>= 1LL) {
    for (int k = j; k <= n; k++)
      if (c[k] & bit) {
        swap(c[k], c[j]);
        break;
      }
    if (!(c[j] & bit)) continue;
    for (int k = j + 1; k <= n; k++)
      if (c[k] & bit) c[k] ^= c[j];
    j++;
  }
  for (int i = 1; i <= n; i++)
    if ((sum ^ c[i]) < sum) sum ^= c[i];
  if (sum)
    puts("1/1\n");
  else {
    long long ans = 0;
    for (int i = 1; i <= n; i++)
      if (!c[i]) ans++;
    ans = 1LL << (n - ans);
    printf("%I64d/%I64d\n", ans - 1, ans);
  }
}
