n = int(input()) f = 1 ok = True pre = -1 ac = 0 for c in list(map(int, input().split())): f ^= c&1 ok &= pre < 0 or pre==c if pre < 0: pre = c ac += c print("Yes" if (f and not ac%n) or ok else "No")