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