#include #include using namespace std; ifstream f("date.in"); ofstream g("date.out"); pair v[1005]; int n, i, j, mod1, mod2; int main() { cin>>mod1>>mod2; /*f>>n; for(i=1;i<=n;i++) f>>v[i].first>>v[i].second;*/ cout<<3<<'\n'; if(mod2==1 && mod1==1) { cout<<1<<' '<<5<<'\n'; cout<<1<<' '<<0<<'\n'; cout<<3<<' '<<1; return 0; } if(mod1==1) { cout<<1<<' '< using namespace std; const long long MOD1 = 2; const long long MOD2 = 4; int N; long long type, val; map , bool> M; int main() { cin>>N; while(N--) { cin>>type>>val; auto hash = make_pair(val % MOD1, val % MOD2); if(type == 1) M[hash] = true; if(type == 2) M[hash] = false; if(type == 3) { if(M.find(hash) == M.end() || (M.find(hash) != M.end() && !M[hash])) cout<<"NO\n"; else cout<<"YES\n"; } } return 0; }*/