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() print("Yes")