Driver Code
public static void main ( String [ ] args ) { int N = 2 ; ArrayList < pair < Integer , Integer > > arr = new ArrayList < > ( ) ; arr . add ( new pair < Integer , Integer > ( 0 , 0 ) ) ; arr . add ( new pair < Integer , Integer > ( 0 , 1 ) ) ; arr . add ( new pair < Integer , Integer > ( 0 , 2 ) ) ; arr . add ( new pair < Integer , Integer > ( 1 , 0 ) ) ; arr . add ( new pair < Integer , Integer > ( 1 , 1 ) ) ; arr . add ( new pair < Integer , Integer > ( 1 , 2 ) ) ; arr . add ( new pair < Integer , Integer > ( 2 , 0 ) ) ; arr . add ( new pair < Integer , Integer > ( 2 , 1 ) ) ; arr . add ( new pair < Integer , Integer > ( 2 , 2 ) ) ; findPoint ( N , arr ) ; } }