#include <bits/stdc++.h>
using namespace std;
int n, cnt, mo = 1e3;
long long fo, FO[102], a, b;
void ADD(long long c) {
  for (int i = 60; i >= 0; i--) {
    if (c & (1ll << i)) {
      if (FO[i])
        c ^= FO[i];
      else {
        FO[i] = c;
        break;
      }
    }
  }
  if (c) cnt++;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld %lld", &a, &b);
    ADD(a ^ b), fo ^= a;
  }
  for (int i = 60; i >= 0; i--) {
    if (fo & (1ll << i)) {
      if (FO[i])
        fo ^= FO[i];
      else
        break;
    }
  }
  if (fo) {
    printf("1/1");
    return 0;
  }
  printf("%lld/%lld", (1ll << cnt) - 1ll, (1ll << cnt));
  return 0;
}
