1398_D. Colored Rectangles
You are given three multisets of pairs of colored sticks: 

  * R pairs of red sticks, the first pair has length r_1, the second pair has length r_2, ..., the R-th pair has length r_R; 
  * G pairs of green sticks, the first pair has length g_1, the second pair has length g_2, ..., the G-th pair has length g_G; 
  * B pairs of blue sticks, the first pair has length b_1, the second pair has length b_2, ..., the B-th pair has length b_B; 



You are constructing rectangles from these pairs of sticks with the following process: 

  1. take a pair of sticks of one color; 
  2. take a pair of sticks of another color different from the first one; 
  3. add the area of the resulting rectangle to the total area. 



Thus, you get such rectangles that their opposite sides are the same color and their adjacent sides are not the same color.

Each pair of sticks can be used at most once, some pairs can be left unused. You are not allowed to split a pair into independent sticks.

What is the maximum area you can achieve?

Input

The first line contains three integers R, G, B (1 ≤ R, G, B ≤ 200) — the number of pairs of red sticks, the number of pairs of green sticks and the number of pairs of blue sticks.

The second line contains R integers r_1, r_2, ..., r_R (1 ≤ r_i ≤ 2000) — the lengths of sticks in each pair of red sticks.

The third line contains G integers g_1, g_2, ..., g_G (1 ≤ g_i ≤ 2000) — the lengths of sticks in each pair of green sticks.

The fourth line contains B integers b_1, b_2, ..., b_B (1 ≤ b_i ≤ 2000) — the lengths of sticks in each pair of blue sticks.

Output

Print the maximum possible total area of the constructed rectangles.

Examples

Input


1 1 1
3
5
4


Output


20


Input


2 1 3
9 5
1
2 8 5


Output


99


Input


10 1 1
11 7 20 15 19 14 2 4 13 14
8
11


Output


372

Note

In the first example you can construct one of these rectangles: red and green with sides 3 and 5, red and blue with sides 3 and 4 and green and blue with sides 5 and 4. The best area of them is 4 × 5 = 20.

In the second example the best rectangles are: red/blue 9 × 8, red/blue 5 × 5, green/blue 2 × 1. So the total area is 72 + 25 + 2 = 99.

In the third example the best rectangles are: red/green 19 × 8 and red/blue 20 × 11. The total area is 152 + 220 = 372. Note that you can't construct more rectangles because you are not allowed to have both pairs taken to be the same color.
```python
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    from functools import lru_cache

    r, g, b = map(int, input().split())
    red = [int(x) for x in input().split()]
    green = [int(x) for x in input().split()]
    blue = [int(x) for x in input().split()]
    red.sort(reverse = True)
    green.sort(reverse = True)
    blue.sort(reverse = True)

    # memo = {}
    # def dp(rIndex, gIndex, bIndex):
    #     if (rIndex, gIndex, bIndex) in memo:
    #         return memo[(rIndex, gIndex, bIndex)]
    #     result = 0
    #     if rIndex < r and gIndex < g:
    #         result = max(result, red[rIndex] * green[gIndex] + dp(rIndex + 1, gIndex + 1, bIndex))
    #     if rIndex < r and bIndex < b:
    #         result = max(result, red[rIndex] * blue[bIndex] + dp(rIndex + 1, gIndex, bIndex + 1))
    #     if gIndex < g and bIndex < b:
    #         result = max(result, green[gIndex] * blue[bIndex] + dp(rIndex, gIndex + 1, bIndex + 1))
    #     memo[(rIndex, gIndex, bIndex)] = result
    #     return result

    dp = [[[0 for _ in range(b + 1)] for _ in range(g + 1)] for _ in range(r + 1)]
    result = 0
    # dp[0][0][0] = max(red[0] * green[0], red[0] * blue[0], green[0] * blue[0])
    for i in range(r + 1):
        for j in range(g + 1):
            for k in range(b + 1):
                if i < r and j < g:
                    dp[i + 1][j + 1][k] = max(dp[i + 1][j + 1][k], dp[i][j][k] + red[i] * green[j])
                if i < r and k < b:
                    dp[i + 1][j][k + 1] = max(dp[i + 1][j][k + 1], dp[i][j][k] + red[i] * blue[k])
                if j < g and k < b:
                    dp[i][j + 1][k + 1] = max(dp[i][j + 1][k + 1], dp[i][j][k] + green[j] * blue[k])
                result = max(result, dp[i][j][k])
    print(result)

# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()
    
```