If you multiply two numbers that can each be up to 100,000, the result can reach 10 billion. This exceeds int range, so you need long long. When in doubt, use long long. The extra memory (4 bytes per variable) rarely matters, but overflow bugs cost you wrong answers and debugging time.
Only use int when you are certain values stay small, like array indices or loop counters that go up to 1000.