To prepare for the campaign on Azeroth, Orgrim Doomhammer needs an additional squad. In response to the conscription, orcs arrived. Doomhammer immediately evaluated each orc's abilities in close combat and javelin throwing. Now, he must decide which orcs to assign as infantry soldiers (grunt) and which as spear-throwers (headhunter).
For the squad to be considered battle-ready, it must include at least grunts and at least headhunters. After assigning each orc to a specialization, the total strength of the squad is calculated as the sum of the abilities of all orcs in their assigned roles.
Write a program to determine the maximum possible strength of the newly formed squad.
The first line contains three integers , , (1 \le n \le 10000,\ 0 \le g,\ h \le n). Each of the following lines contains two integers between and — the close combat ability (for grunt) and the javelin throwing ability (for headhunter) of the corresponding orc.
Output the maximum possible strength the squad can achieve. If it is impossible to form a squad satisfying the given conditions, output .
Example
3 2 1
3 4
8 2
2 921Example
3 2 2
3 4
8 2
2 919Example
2 3 1
1 3
2 2-1Example 3
Example 2
Example 1