Task getting WA in STARTERS 8 problem

I am getting WA in one task in the problem, Square Function | CodeChef
My solution : CodeChef: Practical coding for everyone
My approach is to subtract number of pairs whose product is a square from total number of pairs, pls help.

USE long long int instead of int

It worked, thank you.
(Such a silly mistake! SMH)