#include using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int rand(int l, int r) { return uniform_int_distribution<>(l, r)(rng); } int main() { int c = 1; cout << "? " << c << endl; int x, y; cin >> x; int d = rand(x - 1, 100); cout << "? " << d << endl; cin >> y; for (int A = 0; A <= 100; A ++) { for (int B = A + 1; B <= 100; B ++) { if ((c + A) % B == x && (d + A) % B == y) { cout << "! " << A << " " << B; return 0; } } } return 0; } // 7 10