a=input().split(".") b=input().split(".") n1="".join(a) n2="".join(b) n1=int(n1) n2=int(n2) if n2-n1<=0: print("YES") else: print("NO")