You are given an integer and a function
such that
;
;
;
- the nonzero values of
has period
.
Consider the unique function such that
- when
, then
;
is differentiable everywhere.
Find
for a given complex number
;
- a complex number
with a nonzero imaginary part such that
.
You are further informed that
- The conditions of the function
are equivalent to the conditions of
being a primitive Dirichlet character.
is the analytic continuation of the Dirichlet L-function onto the complex plane.
- Zeta functions can be analytically continued to any portion of the complex plane given by
for real
using the Euler-Maclaurin summation formula.
- If we let
, and
, and
, then
satisfies
.
Constraints
and
and
and
For the first question, the jury answer is precise to , and the magnitude of the difference between your answer and the jury answer should be less than
.
For the second question, the checker is precise to , and the magnitude of
of your answer should be less than
.
Input Specification
The first line contains an integer, .
The next lines contain three nonnegative integers
,
, and
each, representing
respectively. The three integers
correspond to
.
The next line contains two real numbers, with at most digits after the decimal point, representing the real and imaginary parts of
.
Output Specification
On the first line, output the real and imaginary parts for the first answer.
On the second line, output the real and imaginary parts for the second answer.
Sample Input
5
0 0 1
1 0 2
1 1 2
1 3 2
1 2 2
0.69 4.2069
Sample Output
1.5186663729999338699 -0.8641952653252008201
0.5000000000000000000 6.1835781954508539144
Comments