S = input() s = S.replace(" ", "") o = S[::2] print(['No', 'Yes'][s == o])