a,b = map(int,input().split())
while a or b:
    if a%10<b%10: exit(print("No"))
    a //= 10; b //= 10
print("Yes")