s, t = input().split() if abs(ord(s) - ord(t)) == 1: print("Yes") else: print("No")