CSES - KILO 2016 1/5 - Coins
  • Time limit: 2.00 s
  • Memory limit: 512 MB

Uolevi has n coins with values c_1, c_2, \ldots, c_n euros. He is going to pay for purchases that cost p euros. Unfortunately the cashier has only m coins with values d_1, d_2, \ldots, d_m. The cashier will give as large change as possible with the coins available. How much Uolevi should pay to lose a minimal amount of money in the process?

Input

The first line of input contains three integers, n, m and p. The number of coins Uolevi has, the number of coins the cashier has and the cost of Uolevis purchases. The second line contains n integers, c_1, c_2, \ldots, c_n, the values of Uolevis coins. The third line contains m integers, d_1, d_2, \ldots, d_m, the values of the cashiers coins. It is guaranteed that total value of Uolevis coins is at least p.

Output

Output two integers, the optimal amount of money Uolevi should pay and the amount of money Uolevi loses. If there are multiple optimal answers, output any of them.

Constraints

  • 1 \le n \le 100
  • 0 \le m \le 100
  • 1 \le p \le 1000
  • 1 \le c_i, d_i \le 100

Examples

Input:

2 1 3
5 2
3

Output:

7 1

Input:

3 3 10
6 7 6
1 1 1

Output:

13 0

In the second example paying 12 euros is also an optimal answer.