Driver Code
public static void main ( String [ ] args ) { Pair arr [ ] = { new Pair ( 1 , 2 ) , new Pair ( 5 , 6 ) , new Pair ( 6 , 7 ) , new Pair ( 7 , 10 ) , new Pair ( 8 , 9 ) } ; int N = arr . length ;