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