Just Stalling
Farmer John has cows of heights . His barn has stalls with max height limits (so for example, if , then a cow of height at most can reside in stall ). In how many distinct ways can Farmer John arrange his cows so that each cow is in a different stall, and so that the height limit is satisfied for every stall?
Input
The first line contains . The second line contains integers . The third line contains integers . All heights and limits are in the range .
Output
Print the number of ways Farmer John can place each cow into a different stall such that the height limit is satisfied for every stall.
Examples
Note
In this example, we cannot place the third cow into the first stall since . Similarly, we cannot place the fourth cow into the first or third stalls. One way to satisfy the height limits is to assign cow to stall , cow to stall , cow to stall , and cow to stall .