#include #include #include #include int main() { int q; scanf("%d",&q); while(q--) { int n,t=0; scanf("%d",&n); while(n--) { int x,y; scanf("%d%d",&x,&y); if(x!=0 && y!=0 ) t=1; } if(t==0) printf("YES\n"); else printf("NO\n"); } /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }