#include using namespace std; typedef long long ll; #define fi first #define se second int n; void solve(){ cin >> n; mapmp; for(int i=1; i<=n ;i++){ int x,y;cin >> x >> y; mp[-(x+y)]++; } while(!mp.empty()){ auto it=mp.begin(); if(it->fi>=0) break; if(it->se<=1){ mp.erase(it); continue; } mp[it->fi+1]+=it->se/2; mp.erase(it); } if(mp[0]>=3){ cout <<"NO\n"; } else{ cout << "YES\n"; } } int main(){ ios::sync_with_stdio(false);cin.tie(0); int t;cin >> t;while(t--) solve(); }