A=int("".join(input().split("."))) B=int("".join(input().split("."))) if A>=B: print("YES") else: print("NO")