#include using namespace std; //*/ #include using namespace atcoder; //*/ #define rep(i,n) for(int i=0;i; using ll = long long; using ull = unsigned long long; //*/ template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef pair pii; typedef pair pll; typedef vector vll; typedef vector vint; random_device rnd; mt19937 rng(rnd()); using mint = modint998244353; ll f(ll n){ return n*(n+1)/2; } int query(int mid){ int res; cout << "? " << mid << endl; cin >> res; return res; } void solve(){ int n; cin >> n; int l = 1,r = n; int ans1 = -1,ans2 = -1; vint memo(n+1,0),memo2(n+1,0); rep(i,10){ int mid = (l+r)/2; if(memo2[mid]){ if(l == mid) mid = r; else mid = l; } int res = query(mid); if(mid != res) r = mid; else l = mid; if(memo[res] != 0){ ans1 = mid,ans2 = memo[res]; } memo[res] = mid; memo2[mid] = 1; } cout << "Yes " << ans1 << " " << ans2 << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; //cin >> t; rep(testcases,t) solve(); }