#K13106. Highest Two-Round Average Score

    ID: 23839 Type: Default 1000ms 256MiB

Highest Two-Round Average Score

Highest Two-Round Average Score

Given the number of rounds n and the scores of two students in each round, compute the highest possible average (rounded to one decimal place) using any two consecutive rounds for each student.

For each student, consider every pair of consecutive rounds. The average score of the pair is computed as \(\frac{s_i + s_{i+1}}{2}\). Determine the maximum such average for each student.

You are required to take the input from standard input (stdin) and output the result to standard output (stdout) with both averages separated by a space.

inputFormat

The input consists of three lines:

  • The first line contains an integer \(n\) representing the number of rounds (\(n \geq 2\)).
  • The second line contains \(n\) integers denoting the scores of the first student for each round.
  • The third line contains \(n\) integers denoting the scores of the second student for each round.

outputFormat

Output a single line with two floating point numbers (each rounded to one decimal place) representing the highest two-round average scores of the first and second student respectively. The two numbers should be separated by a space.

## sample
3
50 80 70
60 90 85
75.0 87.5

</p>