## Problem C. Market place ≡

 Author: Far-Eastern Subregional Time limit: 1 sec Input file: input.txt Memory limit: 8 Mb Output file: output.txt

### Statement

You are to determine the optimal market strategy (i. e. the price and location of the new post which maximizes anticipated average income) under the assumptions that half of the clients walk in the direction from the first post to the Nth and another half - from the Nth post, to the first, and that they behave according to the pattern above.

### Input file format

The first line of the input file contains the number of existing posts N. The second line contains N integers pi - the prices for the posts. The third line contains N integers - the values of BK for each K. All numbers in a line are separated by spaces.

### Output file format

The output file must contain two integers - L and P. L (1 ≤ L < N) is the number of the existing post after which the new one should be placed (You are not allowed to place your post first or last in the line). The second number P is the optimal price. If there is more than one optimal solution, you should choose the one with the minimal L, and between them - the one with minimal P.

### Constraints

2 ≤ N ≤ 100, 1 ≤ pi ≤ 9999, 0 ≤ Bk ≤ 99, B1 + ... + BN = 100

### Sample tests

No. Input file (input.txt) Output file (output.txt)
1
5
37 34 34 35 33
10 20 30 30 10

3 33

0.057s 0.007s 15