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("Yes") exit() # if A_num <= B_num: # print("Yes") # exit() print("No")