import java.util.*; public class Main { public static void main(String[] args){ Scanner in = new Scanner(System.in); while(in.hasNext()){ int n = Integer.parseInt(in.next()); Array[] array = new Array[n]; for(int i=0; i<n; i++){ array[i] = new Array(Integer.parseInt(in.next()), Integer.parseInt(i...