#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace::std; template void print(const T& v) { for (const auto& x : v) cout << x << " "; cout << endl; } int main() { ios::sync_with_stdio(false); cout << "? 50" << endl; int u; cin >> u; vector> p; for (int a = 0; a < 100; ++a) for (int b = a + 1; b <= 100; ++b) if ((a + 50) % b == u) p.push_back({a, b}); int y = 1; unordered_map> m; for (; y <= 100; ++y) { for (const auto& [a, b] : p) m[(a + y) % b] = {a, b}; if (m.size() == p.size()) { cout << "pre y " << y << endl; break;} else m.clear(); } cout << "? " << y << endl; int w; cin >> w; cout << "! " << m[w].first << " " << m[w].second << endl; return 0; }