H, N = list(map(int, input().split()))

A = list(map(int, input().split()))

A.sort(reverse=True)

for i in range(N):

  H -= A[i]

print(("Yes" if H <= 0 else "No"))
H, N = list(map(int, input().split()))

A = [int(x) for x in input().split()]



print(("Yes" if H <= sum(A) else "No"))
H, N = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort(reverse=True)
for i in range(N):
    H -= A[i]
print(("Yes" if H <= 0 else "No"))

H, N = list(map(int, input().split()))
A = [int(x) for x in input().split()]
print(("Yes" if H <= sum(A) else "No"))

-A = list(map(int, input().split())) -A.sort(reverse=True) -for i in range(N): -    H -= A[i] -print(("Yes" if H <= 0 else "No")) +A = [int(x) for x in input().split()] +print(("Yes" if H <= sum(A) else "No"))