Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 200200 points
Problem Statement
There is pasta consisting of NN noodles at Takahashi's home. The length of the ii-th noodle is A_iAi.
Takahashi has a meal plan for the next MM days. On the ii-th day, he is going to choose a pasta noodle of length exactly B_iBi and eat it. If no such noodle is available on any day, his plan fails. Additionally, he cannot eat the same noodle on multiple days.
Can Takahashi accomplish his meal plan?
Constraints
-
1 \leq M \leq N \leq 10001≤M≤N≤1000
-
1 \leq A_i \leq 10^91≤Ai≤1000000000
-
1 \leq B_i \leq 10^91≤Bi≤1000000000
-
All values in input are integers.
Input
Input is given from Standard Input in the following format:
N M
A1 A2 ... AN
B1 B2 ... BM
Output
Takahashi can accomplish his meal plan, print Yes; otherwise, print No.