import java.util.Arrays; import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); long[] y=new long[n]; for(int i=0;i