Mr. Main and Windmills
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Mr. Main took a train from city to city and passed a plain full of windmills. The train ran in a straight line. A windmill is a machine used for wind power generation. Its fan blades rotate when the wind blows. From his perspective, colorful windmills lined up on the horizon from left to right.
 
As the train was running, the order of windmills from his perspective was constantly changing: a windmill was originally on the left/right of another, and then changed to its right/left; 

Given the coordinates of the windmills, please find the coordinate of him when he just observed the -th windmill exchanged order with other windmills for the -th times. It is guaranteed that any three of the points given, the cities and the windmills, were not collinear, and that all of the windmills were on the same side of the line that the train ran along.



As shown in the picture, in Mr. Mian's perspective, B was initially to the left of A, and later to the right of A.

输入描述:

The first line of input contains two integers  and , where  is number of windmills, and  is number of queries.

The second line contains four integers x_s, y_s, x_t and y_t (), which are the coordinates of the starting city s and destination city t.

The next lines describe the windmills, the -th of which contains two integers x_i,
y_i (), which are the coordinates of the -th windmill.

The next lines describe the queries, the -th of which contains two integers, h_i and k_i (), denoting a query for the coordinates when observing the k_i-th pass of the h_i-th windmill.

输出描述:

Output m lines, each containing two real numbers x_i, y_i, representing the coordinates when the h_i-th windmill is observed to exchange order with other windmills for k times; if it does not exist, output -1. Your answer is considered correct if its absolute or relative error with the standard answer is less than .
示例1

输入

复制
4 2
0 0 5 0
1 3
2 4
4 1
4 5
1 2
3 2

输出

复制
-1
4.6666666667 0.0000000000