import java.util.*; import java.io.*; import java.awt.geom.*; import java.math.*; public class No009 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static boolean debug = false; static void solve() { int n = in.nextInt(); PriorityQueue pQ = new PriorityQueue<>(new Comparator(){ public int compare(int[] a, int[] b) { if (a[0] != b[0]) return a[0] - b[0]; return a[1] - b[1]; } }); for (int i=0; i q = new PriorityQueue<>(pQ); int max = 0; for (int j=i, c=0; c 0; long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); dump((end-start) + "ms"); in.close(); out.close(); } static void dump(Object... o) { if (debug) System.err.println(Arrays.deepToString(o)); } }