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 jars, you have to help Masha by Telling her if each jar has the same parity or not.
The first line of input contains a single integer — the number of jars Masha has.
The second line contains integers .( means the jar contains stones)
Print “Yes”, if each jar has same parity of stones. Otherwise, “No”. (without the quotation marks)
7 12 32 4 2 23 1 43
All numbers are not even and also all numbers are not odd. So they don’t have the same parity.
5 2 4 6 8 10
All numbers are even. So all of them have the same parity.
6 1 3 5 7 9 11
All numbers are odd. So all of them have the same parity.