# Masha and Stones

DCC ICPC'23 Practice–1
Limits 1s, 512 MB

Masha has a good habit of collecting stones. Thus she lives by the side of the sea. Every morning she goes to walk by the side of the sea to collect different kind of beautiful stones. And she contains these stones in a jar. At one random day Masha was sitting under a tree with her random thoughts, looking at the beautiful sea. Now she is thinking, "Does each jar has the same parity or not?". By the way It's just a random thought, so don't judge Masha :p.

Same parity of each jar means,
Each jar have even number of stones or
Each jar has an odd number of stones.”

Given the number of stones in $\bf{N}$ jars, you have to help Masha by Telling her if each jar has the same parity or not.

## Input

The first line of input contains a single integer $\bf{N}$the number of jars Masha has.

The second line contains $\bf{N}$ integers $\bf{J_1, J_2, J_3,...., J_N}$.($\bf{J_i}$ means the $\bf{i^{th}}$ jar contains $\bf{J_i}$ stones)

$\bf{1 \le N, J_i \le 10^3}$

## Output

Print “Yes”, if each jar has same parity of stones. Otherwise, “No”. (without the quotation marks)

## Samples

InputOutput
7
12 32 4 2 23 1 43

No


All numbers are not even and also all numbers are not odd. So they don’t have the same parity.

InputOutput
5
2 4 6 8 10

Yes


All numbers are even. So all of them have the same parity.

InputOutput
6
1 3 5 7 9 11

Yes


All numbers are odd. So all of them have the same parity.