import java.io.*; import java.util.*; public class Solution { public static void runProgram(Scanner in){ int n=in.nextInt(); int[][] coordinates= new int[n][2]; for (int i=0;i0){ if (!(coordinates[counter][0]== coordinates[i][0] || coordinates[counter][1]== coordinates[i][1])) { } else{ System.out.println("YES"); return; } counter--; } } System.out.println("NO"); } public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in=new Scanner(System.in); int qurry=in.nextInt(); for (int i=0;i