#include using namespace std; #define rep(i,a,b) for(int i=a;i<(b);++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair pii; typedef vector vi; typedef long double ld; #define pb push_back #define ff first #define ss second void solve(){ ll t; cin>>t; while(t--){ ll n;cin>>n; map mapi, mp; for(int ii=0;ii>i>>j; mapi[-i-j]++; ll k = -i-j; while(mapi[k] > 1){ mapi[k+1]++; mapi[k]-=2; k++; } } ll ss = 0; for(auto[pw, cnt] : mapi){ if(pw < 0 && cnt > 0) ss++; } if(mapi[1] && mapi[0] && ss == 0) cout << "NO\n"; else if(mapi[1] && mapi[0]) cout << "NO\n"; else cout << "YES\n"; } } int main(){ cin.tie(0); ios_base::sync_with_stdio(0); cout<