# 文字コードの差で判定する C1, C2 = input().split() if abs(ord(C1) - ord(C2)) == 1: print("Yes") else: print("No")