WA in RAINBOWA

https://www.codechef.com/viewsolution/15451070 .This is my attempt at Rainbow Array.I cant find the error.Please help me.

Input
1
13
1 2 3 4 5 6 7 1 1 1 1 1 1
Your output
yes

Thanks a lot.Fixed the error and got AC :smiley: