Give the Parabellum away

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

문제

Ostap is strolling leisurely along the Yessentuki-Moscow route, and scuttling along him is Kislarsky, begging to take his Parabellum away. Kislarsky keeps distance to Ostap strictly constant. Also he keeps constant his speed relative to the ground. He is moving counterclockwise relative to Ostap. Ostap's velocity stays constant (both direction and magnitude-wise).

Help Kislarsky to get away from the Alliance of the Sword and Ploughshare. Find the coordinates of the points where he will be in the given time moments t_it\_i.

입력

The first line of the input file contains eight integers: p_xp\_x, p_yp\_y, q_xq\_x, q_yq\_y, u_xu\_x, u_yu\_y, vv, NN, where:

  • p_xp\_x, p_yp\_y --- the location of Ostap in the initial moment (p_x,p_y104|p\_x|, |p\_y| \le 10^4),
  • q_xq\_x, q_yq\_y --- the location of Kislarsky in the initial moment (q_x,q_y104|q\_x|, |q\_y| \le 10^4),
  • u_xu\_x, u_yu\_y --- the projections of Ostap's velocity upon the coordinate axes OXOX and OYOY respectively (u_x,u_y10|u\_x|, |u\_y| \le 10),
  • vv --- the speed of Kislarsky relative to the ground (u_x2+u_y2+12<v10\sqrt{u\_x^2 + u\_y^2} + \frac{1}{2} < v \le 10),
  • NN --- the number of time moments when the location of Kislarsky is of interest (1N100,0001 \le N \le 100\\,000).

The second line contains NN real numbers t_it\_i -- the moments in time for which the location of Kislarsky must be found (0t_i10000 \le t\_i \le 1000). All numbers t_it\_i are provided with at most five digits after decimal point.

It is guaranteed that initial locations of Ostap and Kislarsky are different.

출력

The output file must contain NN pairs of real numbers (two per line): XX and YY coordinates of Kislarsky's location at the time moment t_it\_i.

The absolute or relative error of each number must not exceed 10510^{-5}.