Find pair with maximum GCD for integers in range 2 to N | Function to find the required pair whose GCD is maximum ; If N is even ; If N is odd ; Driver Code
def solve ( N ) : NEW_LINE INDENT if ( N % 2 == 0 ) : NEW_LINE INDENT print ( N // 2 , N ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( ( N - 1 ) // 2 , ( N - 1 ) ) NEW_LINE DEDENT DEDENT N = 10 NEW_LINE solve ( N ) NEW_LINE