using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ int q = Convert.ToInt32(Console.ReadLine()); for(int i = 0; i < q;i++) { int n = Convert.ToInt32(Console.ReadLine()); bool result = true; for(int j = 0; j < n;j++) { int[] coord = Array.ConvertAll(Console.ReadLine().Split(' '),Int32.Parse); int x = coord[0], y = coord[1]; result = result && (x == 0 || y== 0); } Console.WriteLine(result? "YES" : "NO"); } } }