A,B=[int(x) for x in stdin.readline().rstrip().split()]
S=(stdin.readline().rstrip())
flag=True
if S[0:A].isdecimal() != True:
    flag = False
elif S[A:B] != "-":
    flag = False
elif S[B:].isdecimal() != True:
    flag = False

if flag:
    print("Yes")
else:
    print("No")