Check if X can be converted to Y by converting to 3 * ( X / 2 ) or X | Function to check if X can be made equal to Y by converting X to ( 3 * X / 2 ) or ( X - 1 ) ; Conditions for possible conversion ; Otherwise , conversion is not possible ; Driver Code
def check ( X , Y ) : NEW_LINE INDENT if ( X > 3 ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT elif ( X == 1 and Y == 1 ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT elif ( X == 2 and Y <= 3 ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT elif ( X == 3 and Y <= 3 ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT X = 6 NEW_LINE Y = 8 NEW_LINE check ( X , Y ) NEW_LINE DEDENT