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