Random problem
Random problem
Marty decided to distract his friend Alex from thinking about juicy steaks and entertain him with one interesting puzzle.
First, he randomly chose n points (xi
, yi
) (0 ≤ xi
, yi
≤ 109
). Then, he randomly chose two indices i and j (1 ≤ i, j ≤ n) with equal probability. After that, he calculated the value k = xi
* xj
+ yi
* yj
.
Now he gave Alex n points and the number k. And asks him to find any pair of indices a and b such that xa
* xb
+ ya
* yb
= * k*. Alex does not want to solve this problem, so help him.
Input
The first line contains two integers n and k (1 ≤ n ≤ 200 000, 0 ≤ k ≤ 2 * 1018
).
The next n lines contain two integers xi
and yi
the coordinates of the i-th point (0 ≤ xi
, yi
≤ 109
). It is guaranteed that the points were generated randomly with equal probability.
It is guaranteed that k was evaluated as xi
* xj
+ yi
* yj
, where i and *j * were chosen randomly with equal probability.
Output
Print two integers a and b (1 ≤ a, b ≤ n) such that xa
* xb
+ ya
* yb
= k. If there are several suitable answers, you can print any one.
1 1476978419092933556 901418150 815121916
1 1
10 95652677520045149 805513144 38998401 16228409 266085559 293487744 471510400 138613792 649258082 904651590 244678415 443174087 503924246 579288498 219903162 179297759 762760972 92837851 728185679 983905980 299473031
10 2