// amiD
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define endl '\n'
#define Endl '\n'
#define fi first
#define ii pair<ll,ll>
#define se second
#define ld long double
#define mod 1000000007
#define popcount __builtin_popcountll
#define PI acos(-1.0)
using namespace std;
bool d[33];
int main(){
ll a=0, b=0;
for(int i=0;i<30;i++){
ll y=(1<<i);
printf("? %lld %lld\n", y, y);
fflush(stdout);
int x;
scanf("%d",&x);
if(x!=0)d[i]=1;
if(x==1){
a|=(1<<i);
}
if(x==-1){
b|=(1<<i);
}
}
for(int i=0;i<30;i++){
if(d[i])continue;
ll y=(1<<i);
printf("? %lld 0\n", y);
fflush(stdout);
int x;
scanf("%d",&x);
if(x==0)continue;
b|=(1<<i);
a|=(1<<i);
}
// sdfsfsdfdsf
cout<<"! "<<a<<" "<<b<<endl;
fflush(stdout);
return 0;
}
Ly8gYW1pRAojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcgaW50CiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgZW5kbCAnXG4nCiNkZWZpbmUgRW5kbCAnXG4nCiNkZWZpbmUgZmkgZmlyc3QKI2RlZmluZSBpaSBwYWlyPGxsLGxsPgojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIGxkIGxvbmcgZG91YmxlCiNkZWZpbmUgbW9kIDEwMDAwMDAwMDcKI2RlZmluZSBwb3Bjb3VudCBfX2J1aWx0aW5fcG9wY291bnRsbAojZGVmaW5lIFBJIGFjb3MoLTEuMCkKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKYm9vbCBkWzMzXTsKaW50IG1haW4oKXsKICAgIGxsIGE9MCwgYj0wOwogICAgZm9yKGludCBpPTA7aTwzMDtpKyspewogICAgICAgIGxsIHk9KDE8PGkpOwogICAgICAgIHByaW50ZigiPyAlbGxkICVsbGRcbiIsIHksIHkpOwogICAgICAgIGZmbHVzaChzdGRvdXQpOwogICAgICAgIGludCB4OwogICAgICAgIHNjYW5mKCIlZCIsJngpOwogICAgICAgIGlmKHghPTApZFtpXT0xOwogICAgICAgIGlmKHg9PTEpewogICAgICAgICAgICBhfD0oMTw8aSk7CiAgICAgICAgfQogICAgICAgIGlmKHg9PS0xKXsKICAgICAgICAgICAgYnw9KDE8PGkpOwogICAgICAgIH0KICAgIH0KICAgIGZvcihpbnQgaT0wO2k8MzA7aSsrKXsKICAgICAgICBpZihkW2ldKWNvbnRpbnVlOwogICAgICAgIGxsIHk9KDE8PGkpOwogICAgICAgIHByaW50ZigiPyAlbGxkIDBcbiIsIHkpOwogICAgICAgIGZmbHVzaChzdGRvdXQpOwogICAgICAgIGludCB4OwogICAgICAgIHNjYW5mKCIlZCIsJngpOwogICAgICAgIGlmKHg9PTApY29udGludWU7CiAgICAgICAgYnw9KDE8PGkpOwogICAgICAgIGF8PSgxPDxpKTsKICAgIH0KICAgIC8vIHNkZnNmc2RmZHNmCiAgICBjb3V0PDwiISAiPDxhPDwiICI8PGI8PGVuZGw7CiAgICBmZmx1c2goc3Rkb3V0KTsKICAgIHJldHVybiAwOwp9