v1 = input() v2 = input() print("YES" if v1 > v2 else "NO")