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