ThreeSum problem