Problem:
The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen `-`, and the other characters are digits from `0` through `9`.  You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-
import sys
import itertools
import fractions
import copy
import bisect
import math
#w=input()
from operator import itemgetter
from sys import stdin

from operator import mul
from functools import reduce
from collections import Counter


N=3
M=3
i=0
j=0
k=0
n=3
r=1
a=[0]*5
b=[]
c=[]
A,B=map(int, input().split())
#real=math.sqrt(N)
#r=int(input())
#print(real)
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"
s=input()
a=[i for i in s]
if a[A]!="-":
    print("No")
    sys.exit()


for i in range(A):
    if a[i]!=1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9:
         print("No")
         sys.exit()

for i in range(B):
    if a[i+A+1]!=1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9:
         print("No")
         sys.exit()

print("Yes")

"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''








#print(type(brray[0][0]))
#print(brray)

"列数に関して自由度の高いint型の値を入力するタイプの行列"


'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()

#print(a[0])
#print([a])















#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"





#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)



##############################################################################################
##############################################################################################
#under this line explains example calculation


#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b 

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''





#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)

#A.insert(index, 5)
#print(index)
#print(A)






########################################################################
########################################################################

#print(b2)



#print(b3)


Fixed, accepted submission:
# -*- coding: utf-8 -*-
import sys
import itertools
import fractions
import copy
import bisect
import math
#w=input()
from operator import itemgetter
from sys import stdin

from operator import mul
from functools import reduce
from collections import Counter


N=3
M=3
i=0
j=0
k=0
n=3
r=1
a=[0]*5
b=["0","1", "2", "3", "4", "5", "6", "7", "8", "9"]
c=[]
A,B=map(int, input().split())
#real=math.sqrt(N)
#r=int(input())
#print(real)
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"
s=input()
a=[i for i in s]
if a[A]!="-":
    print("No")
    sys.exit()


for i in range(A):
    #print(i)
    if not a[i] in b:
         print("No")
         sys.exit()

for i in range(B):
    #print(i+A)
    if not a[i+A+1] in b:
         print("No")
         sys.exit()

print("Yes")

"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''








#print(type(brray[0][0]))
#print(brray)

"列数に関して自由度の高いint型の値を入力するタイプの行列"


'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()

#print(a[0])
#print([a])















#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"





#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)



##############################################################################################
##############################################################################################
#under this line explains example calculation


#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b 

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''





#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)

#A.insert(index, 5)
#print(index)
#print(A)






########################################################################
########################################################################

#print(b2)



#print(b3)