A, B = map(int, input().split()) while A and B: a, b = A % 10, B % 10 if a < b: print("No") exit() A //= 10 B //= 10 print("Yes")