You have an array of
nnn elements
a1, a2,…, ana_1, \ a_2,\dots,\ a_na1, a2,…, an.
For each task, you have three integers
l,r,kl,r,kl,r,k.
Ask whether you can find an array
bbb of
k−1k-1k−1 integers satisfy:
∙\bullet∙ l≤ b1< b2< b3<⋯< bk−1< r\ \ l \le \ b_1 < \ b_2 < \ b_3 < \dots < \ b_{k-1} < \ r l≤ b1< b2< b3<⋯< bk−1< r
∙\bullet∙ sum(l,\ sum(l, sum(l, b1), sum(b1+1,b_1) ,\ sum(b_1+1,b1), sum(b1+1, b2),…, sum(bk−1+1, r)b_2), \dots ,\ sum(b_{k-1}+1 ,\ r)b2),…, sum(bk−1+1, r) are the multiplies of 222
Specially, if k=1k=1k=1, it should satisfy sum(l,r)sum(l,r)sum(l,r) is the multiply of 222
We define sum(l,sum(l,sum(l, r)=∑i=lr air) = \sum_{i=l}^{r} \ a_ir)=∑i=lr ai (l≤r)(l\le r)(l≤r).
If possible, print "YES". Otherwise, print "NO