import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int vertical=1,horizontal=1; int x[]=new int[n]; int y[]=new int[n]; for(int i = 0; i < n; i++) { x[i] = in.nextInt(); y[i] = in.nextInt(); } if(x[1]==x[0]) { for(int i=2;i