-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsakurako's_exam.cpp
98 lines (73 loc) · 1.59 KB
/
sakurako's_exam.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/// link of problem : https://codeforces.com/contest/2008/problem/A
#include<bits/stdc++.h>
#include<iostream>
using namespace std;
#define int long long
#define ll long long
#define f first
#define sec second
#define endl "\n"
#define lp(st,nd) for(ll i=st;i<nd;i++)
#define lp2(st,nd) for(ll j=st;j<nd;j++)
#define sp(n) fixed<<setprecision(n)
#define iset set<int>
#define llset set<ll>
#define chset set<char>
#define ivec vector<int>
#define llvec vector<ll>
#define iimap map<int,int>
#define chimap map<char,int>
#define chchmap map<char,char>
#define all(x) x.begin(),x.end()
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define igrid vector<vector<int>>
#define llgrid vector<vector<ll>>
#define pi 3.14159265358979323846264338327
void fast_IO()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
/// BFS
/*igrid arr;
vector<bool> vst;
void bfs (int st) {
queue<int> q;
q.push(st);
vst[st]=1;
while(!q.empty()) {
int u=q.front();
cout<<u<<" "; ///-> check the node
q.pop();
for(auto it : arr[u]) {
if(!vst[it]) {
q.push(it);
vst[it]=1;
}
}
}
}*/
signed main() {
fast_IO();
int tc=1;
cin>>tc;
while(tc--) {
int n,m,ans=0,cnt=0,k,x,y,a,b; cin>>a>>b;
if(a==0) {
b%2==0 ? yes : no;
continue;
}
else if(b==0) {
a%2==0? yes : no;
continue;
}
if(a%2!=0) {
no;
continue;
}
yes;
}
return 0;
}