one=input().split(".") two=input().split(".") n1=int("".join(one)) n2=int("".join(two)) if n1>=n2: print("YES") else: print("NO")