AT_awc0003_e 荷物の配送トラック
Description
Takahashi works at a shipping company. Today, he needs to deliver $ N $ packages from the distribution center to their destinations. Each package is numbered from $ 1 $ to $ N $ , and package $ i $ weighs $ W_i $ kilograms.
The distribution center has $ M $ trucks, each numbered from $ 1 $ to $ M $ . Truck $ j $ has a maximum load capacity of $ C_j $ kilograms, meaning the total weight of packages loaded onto that truck must not exceed $ C_j $ kilograms. There is no limit on the number of packages loaded onto each truck, and it is acceptable for a truck to carry no packages at all.
Each package cannot be split and must be loaded onto exactly one truck. Determine whether it is possible to load all $ N $ packages onto the trucks without exceeding any truck's maximum load capacity.
Input Format
> $ N $ $ M $ $ W_1 $ $ W_2 $ $ \ldots $ $ W_N $ $ C_1 $ $ C_2 $ $ \ldots $ $ C_M $
- The first line contains $ N $ , the number of packages, and $ M $ , the number of trucks, separated by a space.
- The second line contains $ W_1, W_2, \ldots, W_N $ , the weights of the packages, separated by spaces.
- The third line contains $ C_1, C_2, \ldots, C_M $ , the maximum load capacities of the trucks, separated by spaces.
Output Format
If it is possible to load all packages onto the trucks, print `Yes`; otherwise, print `No`.
Explanation/Hint
### Constraints
- $ 1 \leq N \leq 15 $
- $ 1 \leq M \leq 15 $
- $ 1 \leq W_i \leq 10^8 $ $ (1 \leq i \leq N) $
- $ 1 \leq C_j \leq 10^9 $ $ (1 \leq j \leq M) $
- All inputs are integers