import java.io.*; import java.util.*; public final class hack_june_a { static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); static FastScanner sc=new FastScanner(br); static PrintWriter out=new PrintWriter(System.out); public static void main(String args[]) throws Exception { int n=sc.nextInt(); int[] cnt1=new int[1000],cnt2=new int[1000]; for(int i=0;i