WA in RAINBOWA

CodeChef: Practical coding for everyone .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: