N = int(input()) M = int(input()) if N*10 == M: print("Yes") else: print("No")