primes2 W.A.

getting W.A. in the problem: http://www.codechef.com/problems/PRIMES2. My solution link is as: http://www.codechef.com/viewsolution/6586990. Wud anybody suggest me where I’m getting wrong. It will be better if anybody can provide me the test cases where my code is failing…
Thanks…