#D8622. Happy End Problem

    ID: 7165 Type: Default 3000ms 134MiB

Happy End Problem

Happy End Problem

Let's write a program related to an unsolved math problem called "Happy End Problem". Create a program to find the smallest convex polygon formed by connecting exactly k points from the N points given on the plane. However, after being given the coordinates of N points, the question is given the number k of the angles of the convex polygon.

(Supplement: About the happy ending problem) Place N points on the plane so that none of the three points are on the same straight line. At that time, no matter how you place the points, it is expected that if you select k points well, you will definitely be able to create a convex polygon with k corners. So far, it has been proved by 2006 that N = 3 for triangles, N = 5 for quadrilaterals, N = 9 for pentagons, and N = 17 for hexagons. There is also a prediction that N = 1 + 2k-2 for all k-sides above the triangle, but this has not yet been proven. This is a difficult problem that has been researched for 100 years. This question has a nice name, "Happy End Problem". A friend of mathematicians named it after a man and a woman became friends while studying this issue and finally got married. It's romantic.

input

The input consists of one dataset. Input data is given in the following format.

N x1 y1 :: xN yN Q k1 :: kQ

The number of points N (3 ≤ N ≤ 40) on the plane is given in the first line. The coordinates of each point are given in the following N lines. Each point is numbered from 1 to N in the order in which they are entered. xi and yi (-10000 ≤ xi, yi ≤ 10000) are integers representing the x and y coordinates of the i-th point, respectively. The positive direction of the x-axis shall be to the right, and the positive direction of the y-axis shall be upward.

The number of questions Q (1 ≤ Q ≤ N) is given in the following line. A question is given to the following Q line. ki (3 ≤ ki ≤ N) represents the number of corners of the convex polygon, which is the i-th question.

The input shall satisfy the following conditions.

  • The coordinates of the input points are all different.
  • None of the three points are on the same straight line.
  • For each question, there is only one convex polygon with the smallest area, and the difference in area from the second smallest convex polygon is 0.0001 or more.

output

For each question, output all vertices of the convex polygon with the smallest area on one line. The number of vertices is output counterclockwise in order from the leftmost vertex among the bottom vertices of the convex polygon. Separate the vertex numbers with a single space. Do not print whitespace at the end of the line. However, if a convex polygon cannot be created, NA is output.

Example

Input

5 0 0 3 0 5 2 1 4 0 3 3 3 4 5

Output

1 4 5 1 2 4 5 1 2 3 4 5

inputFormat

input

The input consists of one dataset. Input data is given in the following format.

N x1 y1 :: xN yN Q k1 :: kQ

The number of points N (3 ≤ N ≤ 40) on the plane is given in the first line. The coordinates of each point are given in the following N lines. Each point is numbered from 1 to N in the order in which they are entered. xi and yi (-10000 ≤ xi, yi ≤ 10000) are integers representing the x and y coordinates of the i-th point, respectively. The positive direction of the x-axis shall be to the right, and the positive direction of the y-axis shall be upward.

The number of questions Q (1 ≤ Q ≤ N) is given in the following line. A question is given to the following Q line. ki (3 ≤ ki ≤ N) represents the number of corners of the convex polygon, which is the i-th question.

The input shall satisfy the following conditions.

  • The coordinates of the input points are all different.
  • None of the three points are on the same straight line.
  • For each question, there is only one convex polygon with the smallest area, and the difference in area from the second smallest convex polygon is 0.0001 or more.

outputFormat

output

For each question, output all vertices of the convex polygon with the smallest area on one line. The number of vertices is output counterclockwise in order from the leftmost vertex among the bottom vertices of the convex polygon. Separate the vertex numbers with a single space. Do not print whitespace at the end of the line. However, if a convex polygon cannot be created, NA is output.

Example

Input

5 0 0 3 0 5 2 1 4 0 3 3 3 4 5

Output

1 4 5 1 2 4 5 1 2 3 4 5

样例

5
0 0
3 0
5 2
1 4
0 3
3
3
4
5
1 4 5

1 2 4 5 1 2 3 4 5

</p>