a, b = input().split() a = "0" * 12 + a b = "0" * 12 + b for i in range(11): if ord(b[~i]) > ord(a[~i]): print("No") exit() print("Yes")