abc1 = int("".join(input().split("."))) abc2 = int("".join(input().split("."))) print("YES") if abc1>=abc2 else print("NO")