n=int(input()) a = list(map(int,input().split())) cnt = 0 for i in range(1,n): cnt += abs(a[0]-a[i]) if cnt%2: print('No') else: print('Yes')