Harryxun/stf_run huggingface dataset:
a,b=map(int, input().split())
s=list(input())

if s[a]!="-":
  print("No")
  exit()
  
for i in range(a):
  if s[i]=="-":
    print("No")
    exit()

for i in range(b):
  if s[((a+b)-a-1)+i]=="-":
    print("No")
    exit()

print("Yes")


### FIXED CODE ###

a,b=map(int, input().split())
s=list(input())

if s[a]!="-":
  print("No")
  exit()
  
for i in range(a):
  if s[i]=="-":
    print("No")
    exit()

for i in range(b):
  if s[a+1+i]=="-":
    print("No")
    exit()

print("Yes")
s=str(input())
x=list(s)
out=""
for i in range(x):
	if (i+1) % 2 ==0:
		out+=x[i]
print(out)

### FIXED CODE ###

x,t=map(int, input().split())

print(max(x-t,0))
S=input()
count=0
for i in range(len(s)//2):
    if s[i]!=s[-(i-1)]:
        count+=1
print(count)

### FIXED CODE ###

s=input()
count=0
for i in range(len(s)//2):
    if s[i]!=s[-i-1]:
        count+=1
print(count)
from math import floor, log2
inpl = lambda: list(map(int,input().split()))
N, K = inpl()
S = input()
U = S + S[::-1]
Sp = sorted([ U[i:i+N] for i in range(N+1)])[0]
n = 0
while Sp[n] == Sp[0]:
    n += 1

if K > int(floor(log2(N/n))):
    print(Sp[0]*N)
else:
    m = n * (2**(K-1))
    if m >= N:
        print(Sp[0]*N)
    else:
        print(Sp[0]*m + Sp[n:n+N-m])


### FIXED CODE ###

from math import floor, log
inpl = lambda: list(map(int,input().split()))
N, K = inpl()
S = input()
U = S + S[::-1]
Sp = sorted([ U[i:i+N] for i in range(N+1)])[0]
n = 0
while Sp[n] == Sp[0]:
    n += 1

if K > int(floor(log(N/n)/log(2))) + 1:
    print(Sp[0]*N)
else:
    m = n * (2**(K-1))
    if m >= N:
        print(Sp[0]*N)
    else:
        print(Sp[0]*m + Sp[n:n+N-m])
# D問題
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

# nCr
def nCr(n,r):
  return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))

def main():
  n,k=LI()

  # 隙間
  a=n-k+1

  for i in range(1,k+1):
    print(nCr(a,i)*nCr(k-1,i-1)%mod)

main()


### FIXED CODE ###

# D問題
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

# nCr
def nCr(n,r):
  return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))

def main():
  n,k=LI()

  # 隙間
  a=n-k+1

  for i in range(1,k+1):
    if a<i or k-1<i-1:
      print(0)
    else:
      print(nCr(a,i)*nCr(k-1,i-1)%mod)

main()
import math

A,B,C,D = [int(i) for i in input().split()]

CD = C * D // math.gcd(C,D)

cntC = (B // C) - (A // C)
cntD = (B // D) - (A // D)
cntCD = (B // CD) - (A // CD)

if A % C == 0:
    cntC += 1
if A % D == 0:
    cntD += 1
if A % CD == 0:
    cntCD += 1

ans = B - A + 1 - (cntC + cntD - cntCD)
print(ans)

### FIXED CODE ###


def calGCD(x,y):
    while(y > 0):
        x, y = y, x % y
    return x

A,B,C,D = [int(i) for i in input().split()]

CD = C * D // calGCD(C,D)

cntC = (B // C) - (A // C)
cntD = (B // D) - (A // D)
cntCD = (B // CD) - (A // CD)

if A % C == 0:
    cntC += 1
if A % D == 0:
    cntD += 1
if A % CD == 0:
    cntCD += 1

ans = B - A + 1 - (cntC + cntD - cntCD)
print(ans)
# -*- coding: utf-8 -*-

n = int(input())
t = []
for _ in range(n):
    t.append(int(input()))

def gcd(a, b):
    if b==0:
        return a
    return gcd(b, a%b)

def lcm(a,b):
    return a*b/gcd(a,b)

def lcmary(x, t):
    if len(t)==0:
        return x
    elif len(t)==1:
        return lcm(x,t[0])
    else:
        xx = lcm(x, t.pop(0))
        return lcmary(xx, t)

print(lcmary(t[0], t[1:]))


### FIXED CODE ###

from fractions import gcd
def lcm(a,b): return a*b//gcd(a,b)
 
n = int(input())
res = 1
for i in range(n):
    t = int(input())
    res = lcm(res, t)
print(res)
def min(a,i):
for t in range(0, i):
  if a[0] > a[t]:
    a[0] = a[t]
  return a[0]

def max(a,i):
for t in range(0, i):
  if a[0] < a[t]:
    a[0] = a[t]
  return a[0]

def sum(a,i):
for t in range(1, i):
  a[0] += a[t]
  return a[0]

i = int(raw_input())
a = map(int, raw_input().split())
print min(a,i) max(a,i) sum(a,i)

### FIXED CODE ###

def min(a,i):
  x = a[0]
  for t in range(0, i):
    if x > a[t]:
      x = a[t]
  return x

def max(a,i):
  y = a[0]
  for t in range(0, i):
    if y < a[t]:
      y = a[t]
  return y

def sum(a,i):
  s = 0
  for t in range(0, i):
    s += a[t]
  return s

i = int(raw_input())
a = map(int, raw_input().split())
print "%d %d %d" % (min(a,i), max(a,i), sum(a,i))
while True:
    x = input()
    if x == "0":
        break
    ns = []
    for n in x:
    ns.append(int(n))
    print(sum(ns))

### FIXED CODE ###

while True:
    x = input()
    if x == "0":
        break
    num = [int(i) for i in x]
    print(sum(num))
import math
a, b = list(map(int, input().split(' ')))
def lcm(a, b):
    return a * b // math.gcd(a, b)
print(lcm(a, b))

### FIXED CODE ###

import fractions
a, b = list(map(int, input().split(' ')))
def lcm(a, b):
    return a * b // fractions.gcd(a, b)
print(lcm(a, b))
n = int(input())
n = n - 1
ans = []
while n > 0 :
    a = n%26
    n = n//26
    ans.append(chr(a+96))
ans[0] = chr(ord(ans[0]) + 1)
ans = list(reversed(ans))
print("".join(ans))

### FIXED CODE ###

n = int(input())
ans = ""
while n > 0 :
    n -= 1
    ans += chr(ord("a") + n%26)
    n = n//26
print(ans[::-1])
N = int(input())
from collections import Counter
D = [int(i) for i in input().split()]
c = Counter(D)


if D[0] != 0:
  break
if c[0] != 1:
  print(0)
  quit()
if len(c.keys()) != max(c.keys())+1:
  print(0)
  quit()

  
res = 1
for i in range(1,1+max(c.keys())):
  res *= c[i-1]**c[i]
  res %= 998244353
print(res)


### FIXED CODE ###

N = int(input())
from collections import Counter
D = [int(i) for i in input().split()]
c = Counter(D)


if D[0] != 0:
  print(0)
  quit()
if c[0] != 1:
  print(0)
  quit()
if len(c.keys()) != max(c.keys())+1:
  print(0)
  quit()

  
res = 1
for i in range(1,1+max(c.keys())):
  res *= c[i-1]**c[i]
  res %= 998244353
print(res)
a, b, c = map(int, input().split())
if a + b >= c:
    print('No')
elif a**0.5+b**0.5-c**0.5 < 1e-50:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

dataset = (1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51)
k = int(input())
print(dataset[k-1])
n=int(input())
a=list(map(int,input().split()))

mod=10**9+7
acnt=dict()
acnt[a[0]]=1
t=3
for i in range(1,n):

    if a[i] in acnt:
        acnt[a[i]]+=1
    else:
        acnt[a[i]]=1

    if a[i]!=0:
        if acnt[a[i]-1]==2:
            if acnt[a[i]]==1:
                t=(t*2)%mod
        elif acnt[a[i]-1]==3:
            if acnt[a[i]]==1:
                t=(t*3)%mod
            elif acnt[a[i]]==2:
                t=(t*2)%mod
    else:
        if acnt[0]==2:
            t=(t*2)%mod

#    print("i:",i,"a[i]:",a[i],"acnt[a[i]]:",acnt[a[i]],"t:",t)
                
print(t)       
        


### FIXED CODE ###


import sys

n=int(input())
a=list(map(int,input().split()))

#n=54
#a=[0,0,1,0,1,2,1,2,3,2,3,3,4,4,5,4,6,5,7,8,
#   5,6,6,7,7,8,8,9,9,10,10,11,9,12,10,13,14,
#   11,11,12,12,13,13,14,14,15,15,15,16,16,16,
#   17,17,17]
#ans=115295190

#n=10
#a=[3,2,5,1,7,3,6,4,5,4]
#ans=0

if a[0]!=0:
    print(0)
    sys.exit()
 
mod=10**9+7
acnt=dict()
acnt[a[0]]=1
acntkeymax=0
t=3
for i in range(1,n):

    if a[i] in acnt:
        acnt[a[i]]+=1
        if acnt[a[i]]>3:
            print(0)
            sys.exit()
    else:
        if acntkeymax+1==a[i]:
            acntkeymax=a[i]
            acnt[a[i]]=1
        else:
            print(0)
            sys.exit()

    if a[i]!=0:
        if acnt[a[i]-1]==1:
            if acnt[a[i]]!=1:
                print(0)
                sys.exit()
        elif acnt[a[i]-1]==2:
            if acnt[a[i]]==1:
                t=(t*2)%mod
            elif acnt[a[i]]!=2:
                print(0)
                sys.exit()
        elif acnt[a[i]-1]==3:
            if acnt[a[i]]==1:
                t=(t*3)%mod
            elif acnt[a[i]]==2:
                t=(t*2)%mod
            elif acnt[a[i]]!=3:
                print(0)
                sys.exit()
    else:
        if acnt[0]==2:
            t=(t*2)%mod
        elif acnt[0]!=3:
            print(0)
            sys.exit()

#    print("i:",i,"a[i]:",a[i],"acnt[a[i]]:",acnt[a[i]],"t:",t)
                
print(t)
n=input()
a=0
for i in n:
  a+=int(n[i])
print("Yes") if int(n)%a==0 else print("No")

### FIXED CODE ###

n=input()
a=0
for i in n:
  a+=int(i)
print("Yes") if int(n)%a==0 else print("No")
N,M = map(int, input().split())

MOD = 10**9 + 7

a = [int(input()) for _ in range(M)]

dp = [0] * (N+1)
dp[0] = 1
dp[1] = 1
dp[2] = 2

aa = [True] * (N+1)
for i in a:
    aa[i] = False

for i in range(1,N+1):
    if (aa[i] == False):
        dp[i] = 0
        continue
    dp[i] = (dp[i-1]) + (dp[i-2])
print(dp[i]%MOD)


### FIXED CODE ###

N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

MOD = 10**9 + 7

safe = [True] * (N+1)
for i in range(len(A)):
    safe[A[i]] = False

dp = [0] * (N+1)
dp[0] = 1
if safe[1]:
    dp[1] = 1

for i in range(2, N+1):
    if(safe[i]):
        dp[i] = dp[i-1] + dp[(i-2)]
        dp[i] = dp[i] % MOD
    else:
        dp[i] = 0

print(dp[N])
n,m = int(input()), int(input())
i =1
while true:
  if i%n == 0 and i%m == 0:
    print(i)
    break
  i+= 1

### FIXED CODE ###

def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))
N, M, Q = map(int, input().split())
tL = []
tR = []
for i in range(M):
    a, b = map(int, input().split())
    tL.append(a)
    tR.append(b)
ql = []
qr = []
for j in range(Q):
    c, d = map(int, input().split())
    ql.append(c)
    qr.append(d)

for j in range(Q):
    count = 0
    for i in range(M):
        if ql[j] => tL[i] or tR[i] => qr[j]:
            continue
        else:
            count += 1
    print(count)

### FIXED CODE ###

N, M, Q = map(int, input().split())

G = [[0]*(N+1) for _ in range(N+1)]

for _ in range(M):
  L, R = map(int, input().split())
  G[L][R] += 1

for i in range(N+1):
  for j in range(1, N+1):
    G[i][j] += G[i][j-1]

for _ in range(Q):
  p, q = map(int, input().split())
  ans = 0
  for i in range(p, q+1):
    ans += G[i][q]
  print(ans)
s=0,t=-1
for _ in range(int(input())):
    a,b,c=map(int,input().split())
    if t==1:
        if b>c:
            s+=b
            t=2
        else:
            s+=c
            t=3
    elif t==2:
        if a>c:
            s+=a
            t=1
        else:
            s+=c
            t=3
    elif t==3:
        if a>b:
            s+=a
            t=1
        else:
            s+=b
            t=2
    else:
        s+=max(a,b,c)
print(s)

### FIXED CODE ###

n=int(input())
a,b,c=map(int,input().split())
for _ in range(1,n):
    aa,bb,cc=map(int,input().split())
    a,b,c=aa+max(b,c),bb+max(a,c),cc+max(a,b)
print(max(a,b,c))
a,b,k=map(int,input().split())

aa = a - k
if aa < 0:
    bb=b+aa
    aa=0

print (aa,bb)

### FIXED CODE ###

a,b,k=map(int,input().split())

a = a - k

if a < 0:
    b = 0 if b+a <0 else  b+a
    a=0
print (a,b)
import math 
N = input()
a =list(map(int,input().split()))
for i in a:
  B = min(len(bin(i)) -  bin(i).rfind("1") - 1)
print(B)

### FIXED CODE ###

import math 
N = int(input())
A = map(int,input().split())
B = map(bin,A)
def Y(x):
  y = len(x)-x.rfind("1")-1
  return y
C = map(Y,B)
print(min(C))
def s():
 n=int(input())-1
 A=list(map(int,input().split()))
 i=0
 for j in range(n):A[j]<=A[-1]and A[i],A[j]=A[j],A[i];i+=1
 A[i],A[n]=A[n],A[i]
 print(" ".join(map(str,A[:i]))+" ["+str(A[i])+"] "+" ".join(map(str,A[i+1:])))
if'__main__'==__name__:s()


### FIXED CODE ###

def s():
 n=int(input())-1
 A=list(map(int,input().split()))
 i=0
 for j in range(n):
  if A[j]<=A[-1]:A[i],A[j]=A[j],A[i];i+=1
 A[i],A[n]=A[n],A[i]
 print(" ".join(map(str,A[:i]))+" ["+str(A[i])+"] "+" ".join(map(str,A[i+1:])))
if'__main__'==__name__:s()
n = input()
N = int(n)
P = []
counter = 0
input_string = input()
P = input_string.split()

for i in range(int(N)):
    for j in range(N):
        if N == int(P[i]):
            counter = counter + 1
            if N != 1:
                N = N - 1
                break
            else: 
                break
        elif N < int(P[i]):
            break
        else:
            if N != 1:
                N = N - 1   

print(counter)





### FIXED CODE ###

n = input()
N = int(n)
P = []
counter = 0
input_string = input()
P = input_string.split()

for i in range(int(N)):
    for j in range(N):
        if N == int(P[i]):
            counter = counter + 1
            if N != 1:
                N = N - 1
                break
            else: 
                break
        elif N < int(P[i]):
            break
        else:
            if N != 1:
                N = N - 1   

print(counter)
n = int(input())
s = input()

ans = n
if s.count('#') == n or s.count('.') == n:
    ans = 0
    print(ans)
else:
    if num < ans:
        ans = num
    for i in range(n):
        num = s[:i].count('#') + s[i:].count('.')
        if num < ans:
            ans = num
    print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
s = list(input())
res = 10**9

cta = 0
ctb = 0
a = [0]*n
b = [0]*n
for i in range(n):
    if s[i] == '.':
        cta += 1
    else:
        ctb += 1
    a[i] = cta
    b[i] = ctb
for i in range(n):
    res = min(res,b[i]+a[-1]-a[i])
res = min(res,a[-1],b[-1])
print(res)
N, K = map(int, input().split())
Ps = list(map(int, input().split()))
Ps = [i - 1 for i in Ps]
Cs = list(map(int, input().split()))
max_score = -float("inf")


for i in range(N):
    scores = []
    idx = i  # starting index
    while True:
        idx = Ps[idx]  # point to the next index
        scores.append(Cs[idx])  # fetch a score to add
        if idx == i:  # when the cycle is closed
            break
    len_cycle = len(scores)
    sum_cycle = sum(scores)

    if sum_cycle <= 0:  # when each cycle reduces the total score
        score = 0
        for j in range(min(K, len_cycle)):
            score += scores[j]
            max_score = max(max_score, score)
    else:
        if K // len_cycle > 0:
            num_multiply = K // len_cycle - 1
            for j in range(K % len_cycle + len_cycle):
                score += scores[j]
                max_score = max(max_score, score)
        else:
            num_multiply = 0  # len_cycle > K
            score = sum_cycle * num_multiply
            for j in range(K):
                score += scores[j]
                max_score = max(max_score, score)
            
print(max_score)

### FIXED CODE ###

N, K = map(int, input().split())
Ps = list(map(int, input().split()))
Ps = [i - 1 for i in Ps]
Cs = list(map(int, input().split()))
max_score = -float("inf")


for i in range(N):
    scores = []
    idx = i  # starting index
    while True:
        idx = Ps[idx]  # point to the next index
        scores.append(Cs[idx])  # fetch a score to add
        if idx == i:  # when the cycle is closed
            break

    len_cycle = len(scores)
    sum_cycle = sum(scores)

    if sum_cycle <= 0:  # when each cycle reduces the total score
        score = 0
        for j in range(min(K, len_cycle)):
            score += scores[j]
            max_score = max(max_score, score)
    else:
        if K // len_cycle > 0:
            num_multiply = K // len_cycle - 1
            score = sum_cycle * num_multiply
            scores = scores * 2
            for j in range(K % len_cycle + len_cycle):
                score += scores[j]
                max_score = max(max_score, score)
        else:
            num_multiply = 0  # len_cycle > K
            score = sum_cycle * num_multiply
            for j in range(K):
                score += scores[j]
                max_score = max(max_score, score)

print(max_score)
import sys
import math
import bisect
import heapq
import copy
from fractions import gcd
from itertools import permutations, combinations,combinations_with_replacement,product
from collections import defaultdict, Counter, deque

N = int(input())
T, A = [0]*N, [0]*N
for i in range(N):
    T[i], A[i] = map(int, input().split())
a, b = T[0], A[0]
if N == 1:
    print(a+b)
else:
    for x, y in zip(T[1:], A[1:]):
        c = max((a11)//(x+1), (b-1)/(y+1))
        a, b = x*c, y*c
    print(a+b)

### FIXED CODE ###

import sys
import math
import bisect
import heapq
import copy
from fractions import gcd
from itertools import permutations, combinations,combinations_with_replacement,product
from collections import defaultdict, Counter, deque

N = int(input())
T, A = [0]*N, [0]*N
for i in range(N):
    T[i], A[i] = map(int, input().split())
a, b = T[0], A[0]
if N == 1:
    print(a+b)
else:
    for x, y in zip(T[1:], A[1:]):
        c = max((a-1)//x+1, (b-1)//y+1)
        a, b = x*c, y*c
    print(a+b)
n=int(input())
plist=list(map(int, input().split()))
k=0
for i in range(1,n+1):
    if i != plist[i]:
        k+=1
if k <= 2:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

n=int(input())
plist=list(map(int, input().split()))
k=0
for i in range(1,n+1):
    if i != plist[i-1]:
        k+=1
if k <= 2:
    print('YES')
else:
    print('NO')
t, x = map(double, input().split())
print(t/x)

### FIXED CODE ###

t, x = map(float, input().split())
print(t/x)
h,n=map(int,input().split())
l=[]
for i in range(n):
  a=int(input())
  l.append(a)
if sum(l)>=h:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

h, n = map(int, input().split())
a = list(map(int, input().split()))
at = sum(a)
 
if at >= h:
    print("Yes")
else:
    print("No")
N = input()
ret = 0
for c in N:
  ret += (ret + int(c)) % 9
  
if ret  == 0:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

import collections 

N = input()
D = collections.Counter(N)
ret = 0
for c in D.keys():
  ret += int(c) * D[c]
  ret = ret % 9
  
if ret  == 0:
  print('Yes')
else:
  print('No')
def main():
    N, K  = map(int, input().split())
    h = [int(i) for i in input().split()]
    dp = [10**5] * N
    dp[0] = 0

    for i in range(N):
        j = 0
        while j <= K:
            if dp[i] > dp[i-j] + abs(h[i]-h[i-j]):
                dp[i] = dp[i-j] + abs(h[i]-h[i-j])
            j += 1
    print(dp[N-1])

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N, K  = map(int, input().split())
    h = list(map(int, input().split()))
    dp = [10**9] * N
    dp[0] = 0

    for i in range(N):
        dp[i] = min([dp[i-j] + abs(h[i]-h[i-j]) for j in range(min(K,i)+1)])
    print(dp[N-1])

if __name__ == "__main__":
    main()
H,W=map(int,input().split())
N=int(input())
a=list(map(int,input().split()))

ans=''
for i in range(N):
    ans+=str(i+1)*a[i]

for j in range(H):
    s=ans[W*j:W*(j+1)]
    if j%2==0:
        print(' '.join(s))
    else:
        print(' '.join(s[::-1]))

### FIXED CODE ###

N,M=map(int,input().split())
from collections import defaultdict

d1=defaultdict(int)
d2=defaultdict(int)

for _ in range(M):
    a,b=map(int,input().split())
    if a==1:
        d1[b]=1
        if d2[b]==1:
            print('POSSIBLE')
            exit()
    if b==N:
        d2[a]=1
        if d1[a]==1:
            print('POSSIBLE')
            exit()
print('IMPOSSIBLE')
N,M,C = map(int,input().split())
B = list(int,input().split())
count = -
for i in range(N):
  a = list(int,input().split())
  for i in range(M)
  if sum(B[i]*a[i])+C=0:
    count+=1
print(count)

### FIXED CODE ###

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
count = 0
for i in range(N):
  a = list(map(int,input().split()))
  P = C  
  for j in range(M):
    P += B[j]*a[j]
  if P>0:
    count+=1
print(count)
from fractions import gcd
N=int(input())
T=[int(input()) for _ in range(N)]
for t in T:
    a=gcd(a,t)
ans=a
for t in T:
    ans*=t//a
print(ans)

### FIXED CODE ###

from fractions import gcd
N=int(input())
T=[int(input()) for _ in range(N)]
a=0
ans=T[0]
for t in T:
    a=gcd(a,t)
    ans*=t//a
    a=ans
print(ans)
print(C/B)
print(A/D)
if (math.ceil(C/B)-math.ceil(A/D))<1:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import math
A,B,C,D = list(map(int,input().split()))

if (math.ceil(C/B)-math.ceil(A/D))<1:
    print("Yes")
else:
    print("No")
N,M = map(int,input().split())
lsab = []
for i in range(N):
    a,b = map(int,input().split())
    lsab.append([a,b])
lscd = []
for j in range(M):
    c,d= map(int,input().split())
    lscd.append([c,d])

lsans = []
for i in range(N):
    max1 = 2*10**8+1
    for j in range(M):
        dis = abs(lsab[i][0]-lscd[j][0])+abs(lsab[i][1]-lscd[j][1])
        if dis < max1:
            ans = j+1
            max1 = dis
    lsans.append(ans)

for i in range(N):
    print(lsans[i])

### FIXED CODE ###

N,M = map(int,input().split())
lsab = []
for i in range(N):
    a,b = map(int,input().split())
    lsab.append([a,b])
lscd = []
for j in range(M):
    c,d= map(int,input().split())
    lscd.append([c,d])

lsans = []
for i in range(N):
    max1 = 4*10**8+100
    ans = 0
    for j in range(M):
        dis = abs(lsab[i][0]-lscd[j][0])+abs(lsab[i][1]-lscd[j][1])
        if dis < max1:
            ans = j+1
            max1 = dis
    lsans.append(ans)

for i in range(N):
    print(lsans[i])
N = input()

A,B = input().split()

for i in range(N):
  Z = Z + A[i]+B[i]

print(Z)

### FIXED CODE ###

N = int(input())

A,B = input().split()
for i in range(N):
  print(A[i],end = "")
  print(B[i],end = "")
h,w=map(int,input())
print("#"*(w+2))
for _ in range(h):
  print("#"+input()+"#")
print("#"*(w+2))

### FIXED CODE ###

h,w=map(int,input().split())
print("#"*(w+2))
for _ in range(h):
  print("#"+input()+"#")
print("#"*(w+2))
str = input()
str_list = list(str)
 
if str_list[0] =! str_list[1]:
  print("Yes")
elif str_list[1] =! str_list[2]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

str = input()
str_list = list(str)
 
if str_list[0] != str_list[1]:
  print("Yes")
elif str_list[1] != str_list[2]:
  print("Yes")
else:
  print("No")
X, Y = map(int, input().split())
d = {1:300000, 2:200000, 3:100000}
ans = d[X]+d[Y]
if X==1 and Y==1:
  ans += 400000
print(ans

### FIXED CODE ###

from collections import defaultdict
X, Y = map(int, input().split())
d = defaultdict(int)
d[1] = 300000
d[2] = 200000
d[3] = 100000
ans = d[X]+d[Y]
if X==1 and Y==1:
  ans += 400000
print(ans)
#abc133c

l,r=map(int,raw_input().split())
if r-l>3000:
 print 0
 sys.exit()
res=2018
for i in xrange(l,r):
 for j in xrange(i+1,r+1):
  res=min(res,(i*j)%2019)
print res


### FIXED CODE ###

#abc133c

l,r=map(int,raw_input().split())
r=min(r,l+673)
res=2018
for i in  xrange(l,r+1):
 for j in xrange(i+1,r+1):
  res=min(res,i*j%2019)
print res
211 5
31 41 59 26 53

### FIXED CODE ###

import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))
    N = int(next(tokens))
    A_list = []
    for i in range(N):
        A_list.append(int(next(tokens)))

    solve(H, N, A_list)

def solve(H: int, N: int, A_list: list):
    sum_a = 0
    for a in A_list:
        sum_a = sum_a + a

    if H <= sum_a:
        print('Yes')
    else:
        print('No')

    return


 
if __name__ == "__main__":
    propare()