S = input() T = input() M = max(len(S), len(T)) S = '0' * (M - len(S)) + S T = '0' * (M - len(T)) + T for i in range(M): if S[i] < T[i]: print("Yes") break else: print("No")