A, B = input().split() A = A.zfill(10) B = B.zfill(10) for a, b in zip(A, B): if int(a) < int(b): print("No") exit() print("Yes")