A,B = input().split() A_num = int(A) B_num = int(B) A = list(map(int,reversed(list(A)))) B = list(map(int,reversed(list(B)))) for a,b in zip(A,B): if a < b: print("No") exit() if A_num < B_num: print("No") print("Yes")