S = input() if S[::2] == ''.join(S.split()): print('YES') else: print('NO')