a, b = input().split() ans = abs(ord(a) - ord(b)) == 1 print('Yes' if ans else 'No')