# -*- coding: utf-8 -*- N=int(input()) ans="Yes" for i in range(N): P=input() if ans==P: ans="Yes" else: ans="No" print(ans)