Margot Finch goes out to eat. A lot. Like, way too much. Birthdays, Fridays, random Wednesdays — she always finds a reason. And every time, the same thing happens: everyone at the table does their own math, puts their money in the middle, and walks out like everything is fine.
It is never fine.
The waiter always catches her at the door. Every. Single. Time. "Hey, we're still a little short." And because Margot cannot handle the embarrassment, she pays the difference. But here's the thing — paying the difference also makes her anxious. Now she's the one who paid more than everyone else, and that's awkward too. She replays the moment in her head the whole ride home.
And then one night she got home and realized the group had left the waiter zero tip. Zero pesos. The guy had been running back and forth all night. She thought about it for four days straight.
Look — Margot knows tips are not mandatory. She knows waiters should just earn a decent salary. She agrees! But her anxiety does not care about labor policy. If she doesn't leave at least 10%, she will think about it for the next three days.
So now she wants a program. Something she can check before anyone stands up from the table. Something that tells her: are we good, or is this about to be a whole thing?
The first line contains two integers N and M $$$(1 \leq N \leq 10^4,\ 1 \leq M \leq 10^3)$$$: the number of items on the bill and the number of friends at the table (counting Margot).
The second line contains N integers $$$p_1, p_2, \ldots, p_N (1 \leq p_i \leq 10^4)$$$, the price of each item, rounded up to the nearest whole number.
The third line contains M integers $$$a_1, a_2, \ldots, a_M (1 \leq a_j \leq 10^4)$$$: the amount paid by Margot and her friends, also rounded up.
If the total collected is greater than or equal to the bill plus 10% tip (rounded up), print "YES" meaning that all is good and Margot can relax
Otherwise, print: "NO" meaning that all is bad and Margot can't relax.
5 4180 250 120 300 150200 180 150 220
NO
4 5200 350 250 200220 210 200 190 230
NO
3 3300 350 250350 400 260
YES
| Name |
|---|


