Wrong ans in one test case

@shivamgoel150 you are checking primes upto 10^5 but it is mentioned in the input format that answer can be upto 10^6, so check and store prime numbers upto 10^6.

hello @shivamgoel150
see reply of devwrat