Lists to store maximum and minimum of all the four forms
List < int > V = new List < int > ( ) ; List < int > V1 = new List < int > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { V . Add ( A [ i ] . x + A [ i ] . y ) ; V1 . Add ( A [ i ] . x - A [ i ] . y ) ; }