9078 - Angle Sort   

Description

Given an original point O and N points in 2D plane, please sort N points by the angles.

Input

The input includes multiple test cases.

In each test case, the first line contains one integer N, which indicates the number of points. Next line contains two floating point numbers, which indicate the position of O. The following N lines are same as above.

Guarantee every two points must be at the different positions.

Guarantee every angle exists at most one point.

1 <= N <= 104

-10001 <= x, y <= 10001, for every x, y

Output

The one line contains N numbers representing the indices of the points. Every two numbers are separated by single space. The indices are between 1 and N. (1 <= Pi <= N)

Sample Input  Download

Sample Output  Download

Tags




Discuss