#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); // First query: force X1 = X^99990 mod 99991 = 1 for all 100 ≤ X ≤ 100000 const long long A1 = 99990; const long long B1 = 99991; cout << A1 << " " << B1 << "\n" << flush; long long K1; if (!(cin >> K1)) return 0; // read gcd, but we don't actually need its value // Second query: dummy, just to perform "it twice" // any valid 100 ≤ A2,B2 ≤ 10^5 will do, and since X1=1 we still know X2=1 const long long A2 = 10000; const long long B2 = 10007; cout << A2 << " " << B2 << "\n" << flush; long long K2; if (!(cin >> K2)) return 0; // read gcd again, also unused // After two operations, X' = 1^A2 mod B2 = 1 cout << 1 << "\n" << flush; int verdict; cin >> verdict; // read 0/1, then exit return 0; }