a, b = map(int, input().split()) while b > 0: if a % 10 < b % 10: print("No") break a //= 10 b //= 10 else: print("Yes")