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