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