#include #include #define rep(i,n) for(int i=0;i P; template ostream& operator<<(ostream& os, const static_modint& a) {os << a.val(); return os;} template ostream& operator<<(ostream& os, const dynamic_modint& a) {os << a.val(); return os;} template istream& operator>>(istream& is, static_modint& a) {long long x; is >> x; a = x; return is;} template istream& operator>>(istream& is, dynamic_modint& a) {long long x; is >> x; a = x; return is;} template istream& operator>>(istream& is, vector& v){int n = v.size(); assert(n > 0); rep(i, n) is >> v[i]; return is;} template ostream& operator<<(ostream& os, const pair& p){os << p.first << ' ' << p.second; return os;} template ostream& operator<<(ostream& os, const vector& v){int n = v.size(); rep(i, n) os << v[i] << (i == n - 1 ? "\n" : " "); return os;} template ostream& operator<<(ostream& os, const vector>& v){int n = v.size(); rep(i, n) os << v[i] << (i == n - 1 ? "\n" : ""); return os;} template ostream& operator<<(ostream& os, const set& se){for(T x : se) os << x << " "; os << "\n"; return os;} template ostream& operator<<(ostream& os, const unordered_set& se){for(T x : se) os << x << " "; os << "\n"; return os;} template ostream& operator<<(ostream& os, const atcoder::segtree& seg){int n = seg.max_right(0, [](S){return true;}); rep(i, n) os << seg.get(i) << (i == n - 1 ? "\n" : " "); return os;} template ostream& operator<<(ostream& os, const atcoder::lazy_segtree& seg){int n = seg.max_right(0, [](S){return true;}); rep(i, n) os << seg.get(i) << (i == n - 1 ? "\n" : " "); return os;} template void chmin(T& a, T b){a = min(a, b);} template void chmax(T& a, T b){a = max(a, b);} const int M = 4; int main(){ int len = 1; auto plus = [&](int i, int j){ cout << "? " << i << " + " << j << "\n"; char c; cin >> c; len++; return c; }; auto minus = [&](int i, int j){ cout << "? " << i << " - " << j << "\n"; char c; cin >> c; len++; return c; }; auto multiply = [&](int i, int j){ cout << "? " << i << " * " << j << "\n"; char c; cin >> c; len++; return c; }; auto root = [&](int i, int j){ cout << "? " << i << " r " << j << "\n"; char c; cin >> c; len++; return c; }; { root(1, 1); } map memo; for(int i = 0; i < M; i++){ plus(i + 2, i + 2); memo[1 << i] = i + 2; } // ok <= n < ng int idx_ok; long long ok = -1, ng = -1; for(int i = 0; i < M; i++){ auto c = minus(1, i + 2); assert(c != 'e'); if(c == '+' or c == '0'){ continue; }else{ idx_ok = (i + 2) - 1; ok = (1 << (i - 1)); ng = (1 << i); break; } } assert(ok > 0); assert(ng > 0); while(ng - ok > 1){ long long mid = (ok + ng) / 2; long long delta = mid - ok; if(memo.find(delta) == memo.end()){ assert(false); } int idx_delta = memo[delta]; int idx_mid = -1; { plus(idx_ok, idx_delta); idx_mid = len; } { auto c = minus(1, idx_mid); if(c == '+' or c == '0'){ ok = mid; idx_ok = idx_mid; }else{ ng = mid; } } } long double SMALL = 0.0000001; long double r2 = pow(ok, 0.5); long double r3 = pow(ok, (long double)1/ 3); for(int d = 1; d <= ok; d++){ if(ok % d == 0){ if(r2 - r3 - SMALL <= d and d <= r2 + r3 + SMALL){ cout << "! Yes\n"; return 0; } } } cout << "! No\n"; return 0; }