import java.util.*; class status implements Comparable{ int level; int count; status(int level,int count){ this.level=level; this.count = count; } @Override public int compareTo(status arg0) { int value = this.level - arg0.level; if(value==0){ return this.count-arg0.count; } return value; } } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] party = new int[N]; int[] enemy = new int[N]; for(int i=0;i queue= new PriorityQueue(); for(int j=0;j