A,B=list(map(int,input().split())) for i in range(10): if (A//10**i)%10<(B//10**i)%10: print("No") exit() print("Yes")