Let us denote two sequences of real numbers and . Define a sequence of complex numbers by z(k) = x(k) + i y(k).

Let \mathrm{FFT}_N(k, z) be defined. Similarly, \mathrm{FFT}_N(k, x) and \mathrm{FFT}_N(k, y) are defined.
Given the calculated values \mathrm{FFT}_N(k, z), restore the values \mathrm{FFT}_N(k, x) and \mathrm{FFT}_N(k, y).
The first line contains an integer (1 \leq N \leq 2^{30}, is a power of two). Then six non-negative integers , , , , , follow, each not exceeding . For convenience, the value \mathrm{FFT}_N(k, z) is calculated by the formulas:
where \mathrm{FFT}_N(k, z).\mathrm{real} and \mathrm{FFT}_N(k, z).\mathrm{imag} are the real and imaginary parts, respectively.
Then (1 \leq M \leq 10^5), the number of queries, is given. Then integers q_i (0 \leq q_i \leq N) follow.
The output should contain lines. In the -th line, print the values \mathrm{FFT}_N(q_j, x) and \mathrm{FFT}_N(q_j, y). The output values must differ from the correct ones by no more than 10^{-4}.
Example 1