St Andrews Online Judge

Tokyo Exploration

By Kay Akashi

Time: 2000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

Tokyo is a wonderland of gastronomy.

There're NN sushi places and MM ramen places in one area of Tokyo. ii-th sushi place costs you AiA_i yen (1iN1 \leq i \leq N) and jj-th ramen place costs you BjB_j yen (1jM1 \leq j \leq M) (note: yen is a Japanese currency).

You decided to go to one sushi restaurant for lunch and one ramen restaurant for dinner. Given an integer KK (1KN+M1 \leq K \leq N + M), output the KK-th biggest price you're going to spend in total. More formally, output the KK-th greatest value of Ai+BjA_i + B_j where 1iN1 \leq i \leq N and 1jM1 \leq j \leq M.

Constraints

1KN+M1 \leq K \leq N + M. 1Ai,Bj1091 \leq A_i, B_j \leq 10^9.

Subtask 1 (25%)

1N,M1001 \leq N, M \leq 100.

Subtask 2 (75%)

1N,M1051 \leq N, M \leq 10^5.

Input

The first line of input contains 33 integers, NN, MM, and KK. The second line of input contains NN integers, A1A_1, A2A_2, …, ANA_N. The third line of input contains MM integers, B1B_1, B2B_2, …, BMB_M.

Output

Output a single integer, the KK-th biggest total price of sushi lunch and ramen dinner.

Examples

Input

3 3 5
1200 1500 1000
800 1100 1700

Output

2300

Explanation

From the most expensive to cheapest, possible combined prices are as follows: 3200,2900,2700,2600,2300,2300,2100,2000,18003200, 2900, 2700, 2600, 2300, 2300, 2100, 2000, 1800. The 55-th most expensive combination is 23002300 yen.

Input

7 5 12
1234 2342 8255 9273 1400 988 1482
3002 2351 1925 1351 1000

Output

4693