import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n=scan.nextInt(); long [] ar =new long [n]; for(int j=0;j