C1, C2 = map(str, input().split()) if abs(ord(C1)-ord(C2))== 1: print('Yes') else: print('No')