t = input() m = input() if t > m: print ("YES") else: print ("NO")