Function to find two pairs ( a , b ) and ( c , d ) such that a < c and b > d
def findPair ( arr , N ) : NEW_LINE INDENT for i in range ( N ) : NEW_LINE INDENT a , b = arr [ i ] [ 0 ] , arr [ i ] [ 1 ] NEW_LINE for j in range ( i + 1 , N ) : NEW_LINE INDENT c , d = arr [ j ] [ 0 ] , arr [ j ] [ 1 ] NEW_LINE if ( a < c and b > d ) : NEW_LINE INDENT print ( " ( " , a , b , " ) , ▁ ( " , c , d , " ) " ) NEW_LINE return NEW_LINE DEDENT DEDENT DEDENT DEDENT