a, b = map(int, input().split())
s =  input()
num = ["0","1","2","3","4","5","6","7","8","9"]
check = True
for i in range(a):
    if not s[i] in num:
        check = False
        break
if s[a+1] != "-":
    check = False

for j in range(b):
    if not s[j+a+1] in num:
        check = False
        break

if check == True:
    print("Yes")
if check == False:
    print("No")
