Bank
Hard
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
people came to some bank to get their salary of tenge. There are total banknotes left in the bank with values tenge correspondently. You need to determine whether bank is able to give exact salary to all people using given banknotes or not.
Input
First line contains two integers and — number of people and number of banknotes. Second line contains integers — salary values. Third line contains integer numbers — values of banknotes.
Output
Print one word "YES", if bank is able to pay salary. In opposite case print "NO".
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 6%