func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve() {     long long int n, q, x, y, cnt = 0;     cin >> n >> q;     vector<vector<long long int>> dp(3, vector<long long int>(n + 2, 0));     while (q--) {       cin >> x >> y;       if (dp[x][y] == 0) {         cnt += (dp[3 - x][y] == 1);         cnt += (dp[3 - x][y - 1] == 1);         cnt += (dp[3 - x][y + 1] == 1);         dp[x][y] = 1;       } else {         cnt -= (dp[3 - x][y] == 1);         cnt -= (dp[3 - x][y - 1] == 1);         cnt -= (dp[3 - x][y + 1] == 1);         dp[x][y] = 0;       }       if (cnt == 0)         cout <<  Yes  <<   n ;       else         cout <<  No  <<   n ;     }   }   int main() {     ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);     long long int t = 1;     while (t--) {       solve();     }     return 0;   }   