# -*- coding: utf-8 -*-
 
a,b = map(int,raw_input().split())
s = raw_input()
flg = True

for i in range(0,a):
    if(not('0'<=s[i] and s[i]<='9')):flg = False
if(s[a] != '-'):flg = False
for i in range(a+1,a+b+1):
    if(not('0'<=s[i] and s[i]<='9')):flg = False
print('Yes' if flg else 'No')