F. Egg
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Ivan the Iguana has a strong craving for eggs. He particularly enjoys having his eggs either scrambled or fried.

Today's dinner consists of $$$N$$$ eggs.

Ivan has three options for each egg: fry it, scramble it, or not eat it at all. Ivan's appetite permits him to eat a maximum of $$$F$$$ fried eggs and $$$S$$$ scrambled eggs. The $$$i^{th}$$$ egg will give Ivan a satisfaction level of $$$f_i$$$ if fried and $$$s_i$$$ if scrambled. Ivan initially starts at a satisfaction level of $$$0$$$.

Please find the maximum amount of satisfaction that Ivan can gain from eating his eggs if he optimally picks which eggs are scrambled and which are fried.

$$$\textit{Note}: $$$ Ivan can eat less than $$$F$$$ fried eggs and $$$S$$$ scrambled eggs if he can have greater satisfaction doing so.

Input

The first line of input contains three integers: $$$N \space F \space S$$$, the total number of eggs, the maximum number of fried eggs Ivan can eat, and the maximum number of scrambled eggs Ivan can eat. $$$(1 \leq N \leq 10,000; 0 \leq F+S \leq 100)$$$

The next $$$N$$$ lines of input contain two integers: $$$f_i \space s_i$$$, the satisfaction level of the $$$i^{th}$$$ egg when fried and scrambled respectively. $$$(-10^9 \lt f_i, s_i \lt 10^9)$$$

Output

Please output 1 integer, the maximum amount of satisfaction that Ivan can gain from eating his eggs.

Examples
Input
5 1 2
3 8
5 6
7 7
4 5
6 2
Output
21
Input
4 0 1
100 -5
5 20
-6 15
30 30
Output
30