CPython lite logoProblemsContests

2031. Changes #2

You have been given an array consisting of n numbers and queries to it:

  • For each request, for all elements lir, assign values ​​\ (x\), ai=x.

After each request, check the parity of the array sum.


Input

The first line contains two natural numbers, n,q(1n,q2105).

The array elements are indicated in the next line, ai(1ai109).

The next q lines contain queries, li,ri,xi(1lirin),(1xi109).

Output

For each query, print Yes if the array sum is even, and No otherwise.


Sample input 1

5 3
1 2 3 4 5
1 2 3
1 5 1
4 4 9

Sample output 1

Yes
No
No

Sample input 2

5 5
12 23 34 45 56
3 5 67
2 4 78
1 3 89
2 5 90
1 1 1

Sample output 2

Yes
No
Yes
No
No

Login to be able to submit.

Problem
A 65
B1 60
B2 20
C 3
D 36
E1 36
E2 18
F 14
G 3
H 2
I 0
J 2
HardData structuresArray
16 / 17
Solved / unsolved count
0.5 s / 256 MB
Limits