## A Math Contest P17 - Heatwaves

View as PDF

Points: 45
Time limit: 7.0s
Memory limit: 512M

Author:
Problem type

You are given an integer and a function such that

1. ;
2. ;
3. ;
4. the nonzero values of has period .

Consider the unique function such that

1. when , then ;
2. is differentiable everywhere.

Find

1. for a given complex number ;
2. a complex number with a nonzero imaginary part such that .
You are further informed that
1. The conditions of the function are equivalent to the conditions of being a primitive Dirichlet character.
2. is the analytic continuation of the Dirichlet L-function onto the complex plane.
3. Zeta functions can be analytically continued to any portion of the complex plane given by for real using the Euler-Maclaurin summation formula.
4. 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