a,b = map(int,input().split()) import sys for _ in range(12): aa = a% 10 bb = b % 10 if bb > aa: print('No') exit() a //= 10 b //= 10 print('Yes')