#P1979E. Manhattan Triangle
Manhattan Triangle
No submission language available for this problem.
Description
The Manhattan distance between two points and is defined as:
We call a Manhattan triangle three points on the plane, the Manhattan distances between each pair of which are equal.
You are given a set of pairwise distinct points and an even integer . Your task is to find any Manhattan triangle, composed of three distinct points from the given set, where the Manhattan distance between any pair of vertices is equal to .
Each test consists of multiple test cases. The first line contains one integer () — the number of test cases. The description of the test cases follows.
The first line of each test case contains two integers and (, , is even) — the number of points and the required Manhattan distance between the vertices of the triangle.
The -th line of each test case contains two integers and () — the coordinates of the -th point. It is guaranteed that all points are pairwise distinct.
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, output three distinct integers , , and () — the indices of the points forming the Manhattan triangle. If there is no solution, output "" (without quotes).
If there are multiple solutions, output any of them.
Input
Each test consists of multiple test cases. The first line contains one integer () — the number of test cases. The description of the test cases follows.
The first line of each test case contains two integers and (, , is even) — the number of points and the required Manhattan distance between the vertices of the triangle.
The -th line of each test case contains two integers and () — the coordinates of the -th point. It is guaranteed that all points are pairwise distinct.
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, output three distinct integers , , and () — the indices of the points forming the Manhattan triangle. If there is no solution, output "" (without quotes).
If there are multiple solutions, output any of them.
Note
In the first test case:

In the third test case:

In the fourth test case, there are no two points with a Manhattan distance of , and therefore there is no suitable Manhattan triangle.