import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.Comparator; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().run(); } boolean check(int[] A,int P,int Q) { return find(A, P) < find(A, Q); } void yes(int[] A) { for (int i=0;i0&&A[iq-1]==Q)) break; } int ip=find(A, P); int iq=find(A, Q); for (int i=iq;i0 && a[p-1]>a[p]) --p; if (p==0) return false; int q=p; while (q+1