import java.io.*; import java.util.*; class Main { public static void main(String[] args) { MyScanner sc = new MyScanner(); out = new PrintWriter(new BufferedOutputStream(System.out)); int n=sc.nextInt(); int[]a=new int[n],b=new int[n]; for(int i=0;i=0;--i){ if(d[i]