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