just like 3Sum problem