import java.io.*; import java.util.*; import java.math.BigInteger; public class Solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); int q = input.nextInt(); for(int i=0;imaxy) maxy = arr[j][1]; } if(arr[j][1] == 0) { if(arr[j][0]>maxx) maxx = arr[j][1]; } } arr[0][0] = 0; arr[0][1] = 0; boolean flag = false; for(int jk=0;jk