CSES - Two Array Average
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given two arrays of nn integers.

Your task is to select a nonempty prefix from both arrays such that the average of all selected numbers is as large as possible.

Input

The first line has an integer nn.

The second line has nn integers a1,a2,,ana_1,a_2,\dots,a_n: the numbers in the first array.

The third line has nn integers b1,b2,,bnb_1,b_2,\dots,b_n: the numbers in the second array.

Output

Print two numbers: the prefix sizes.

Your answer is considered correct if the absolute or relative difference to the maximum average is at most 10610^{-6}.

Constraints

  • 1n1051 \le n \le 10^5
  • 1ai,bi1091 \le a_i, b_i \le 10^9

Example

Input:

4
1 5 5 2
3 1 3 1

Output:

3 1

Explanation: if you choose the prefixes [1,5,5][1,5,5] and [3][3], the average is (1+5+5+3)/4=3.5(1+5+5+3)/4=3.5 which is the maximum possible average.