struct GuessResult {
    int comparison;  //  1: your guess was too low, -1: your guess was too high
    bool swapped;    // whether Rybina swapped the two halves (A B <-> B A) after this guess
};

GuessResult guess(long long X);

void rybina_search(int N);
