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