c1, c2 = input().split() print("Yes" if abs(ord(c1) - ord(c2)) == 1 else "No")