#!usr/bin/env python3
#! = map(int, input().split())
#! = [int(input()) for i in range()]

#A
"""
n,l=map(int, input().split())
s=[list(input()) for i in range(n)]
s.sort()
for i in s:
    for j in i:
        print(j,end="")
print()
"""

#B
a,b = map(int,input().split())
s = list(input())
k = s[:a]
asfpod = list("11234567890")
d = s[a+1:]
for i in k:
    if i not in asfpod:
        print("No")
        quit()
for i in d:
    if i not in asfpod:
        print("No")
        quit()
print("Yes")
#C

#D

#E

#F
"""
n = int(input())
a = list(map(int, input().split()))
l = 0
r = 0
if n == 1:
    print(1)
    quit()
ans = 0
flag = [False for i in range(200000)]
flag[a[0]] = True
while r < n-1:
    r += 1
    while flag[a[r]]:
        flag[a[l]] = False
        l += 1
    ans = max(ans, r-l+1)
    flag[a[r]] = True
print(ans)
"""

#G
"""
r,c,d = map(int, input().split())
stage = [list(map(int, input().split())) for i in range(r)]
lis = []
for i in range(r):
    for j in range(c):
        lis.append([stage[i][j],i,j])
lis.sort(key = lambda x:-x[0])

for l,y,x in lis:
    if y+x <= d and (y+x-d)%2 == 0:
        print(stage[y][x])
        quit()
"""
#H

#I
"""
mod = 1000000007

def pow(a,b,c):
    n = 1
    m = a
    v = b
    while v > 0:
        if v%2 == 1:
            n *= m%c
            n %= c
        m *= m
        m%= c
        v //= 2
    return n%c

n = int(input())
a = list(map(int, input().split()))
l = 0
r = 0
ans = 0
flag = False
while r < n-1:
    while a[r] != -1:
        r += 1
        if r == n-1:
            break
    l = r-1
    while a[r] == -1:
        flag = True
        r += 1
    if a[r] != a[l]:
        su = 1
        s = a[r]-a[l]+1
        for i in range(1, r-l):
            su *= (s+i-1)
            su %= mod
            su *= pow(i, mod-2, mod)
            su %= mod
        ans += su
        ans %= mod
if ans == 0 and flag:
    ans = 1
print(ans)
"""
#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T
