| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 2 | 0 | 0 | 0.000% |
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_i$.
The first line of the input file contains eight integers: $p_x$, $p_y$, $q_x$, $q_y$, $u_x$, $u_y$, $v$, $N$, where:
The second line contains $N$ real numbers $t_i$ -- the moments in time for which the location of Kislarsky must be found ($0 \le t_i \le 1000$). All numbers $t_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 $N$ pairs of real numbers (two per line): $X$ and $Y$ coordinates of Kislarsky's location at the time moment $t_i$.
The absolute or relative error of each number must not exceed $10^{-5}$.
2 3 4 5 1 1 2 10 1 2 3 4 5 6 7 8 9 10.00
3.311667781 6.811203158 1.618058050 6.525238521 2.396313856 4.895093459 4.356603786 4.697990251 6.268584256 5.267779107 8.050839947 6.172029827 9.724368272 7.265902232 11.304988035 8.490616365 12.800188718 9.818413289 14.210788762 11.235796766