C1, C2 = input().split() if C1 > C2: C1, C2 = C2, C1 print("Yes" if ord(C1)+1 == ord(C2) else "No")