Richard has built a very large Zerg army. He has different types of units in his army, specifically he has units that each provide units of supply.
Due to a supply crunch, he must give away some of his units. He wishes to free up exactly units of supply. He can do this by sacrificing some of his existing units and spawning other units. He wants to minimize the sum of number of units he has to sacrifice and number of units he has to spawn. Help him!
Constraints
All are unique.
Input Specification
The first line contains two space-separated integers, and .
The next line contains space-separated integers, the values in order.
The next line contains space-separated integers, the values in order.
Output Specification
Output the minimum desired sum. Output -1
if it's impossible to lose exactly units of supply.
Sample Input
3 70
5 25 50
5 2 1
Sample Output
3
Comments