Why the code doesnt work with int?

My code doesn’t pass one test case if i use int datatype.However if use long long it works fine.Why is it so?With the given constraints i think int should be enough?

my code: https://ide.codingblocks.com/s/225786

The constraints are large. Also when you multiply the coordinates to find the distance, there is a possibility that it will exceed 10^9. So you should use long long int.