Banach

아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

Stefan, David and Felix are preparing an ACM-style programming contest. Stefan proposes the following task: 

Given NN points on a plane and NN movement vectors, find a one-to-one correspondence between vectors and points such that, if one moves (translates) each point by the corresponding vector, the distance between every pair of points will not decrease.

David managed to solve this problem pretty fast and claims it's too easy to be included in the problemset. To convince him, Felix proposed the following update: among all possible solutions, choose the one that maximizes the sum of squares of all resulting pairwise distances.

David still finds the problem to be easy, do you agree?

입력

The first line of the input contains a single integer NN, the number of points and vectors (1N5001 \leq N \leq 500).

Next NN lines describe points. Each of them contains two integers px_ipx\_i and py_ipy\_i (0px_i,py_i10,0000 \leq |px\_i|, |py\_i| \leq 10\\,000).

Then follow NN lines with vectors descriptions. Each vector is defined by two integers vx_ivx\_i and vy_ivy\_i (0vx_i,vy_i10,0000 \leq |vx\_i|, |vy\_i| \leq 10\\,000).

출력

If there exists a way to establish a one-to-one correspondence such that all pairwise distances will not decrease, print "Yes" on the first line of the output. On the next line, print NN distinct integers from 11 to NN, ii-th of these numbers being the vector assigned to ii-th point.

Do not forget to choose the answer with maximum possible sum of squares of all resulting pairwise distances. If there are still multiple answers, output any of them.

If there is no way to meet the desired requirement, print "No" on the single line of the output.

힌트

In the first example, there are only two possible ways to establish a one-to-one correspondence between points and vectors. In both correspondences, "1 2" and "2 1", the distance between every pair of points does not decrease. In the first case the sum of squares of all resulting pairwise distances is equal to 99, but in the second one it is equal to 2525. So, the only correct answer is "2 1".

In the second example, there are again only two possible ways to establish a correspondence. In both cases, the distance between every pair of points does not decrease, and the sum of squares of all resulting pairwise distances is equal to 00. So, both of the answers are correct.