Samouel has an array A of N integers indexed from 1 to N. Initially, all of the integers are 0. His friend, Gregor also has an array B of N integers indexed from 1 to N.
Samouel wants to modify his array such that his array becomes equal to Gregor's. To achieve that, Samouel can apply the following operation: choose two consecutive indices i and i + 1 (1 ≤ i < N) and do either the following:
Determine whether it is possible for Samouel to achieve his goal.
The first line contains one integer: N (1 ≤ N ≤ 100) in a line denoting the length of both array A and B. The second line contains N integers: B1, B2, ..., BN (0 ≤ Bi ≤ 50,000) in a line denoting the value of array B.
Output “YES" in a line if it is possible for Samouel to achieve his goal, or "NO" otherwise.