# coding: utf-8
# Your code here!
A,B=[int(i) for i in input().split()]
S=input()
flag = 1
L = A+B+1
if len(S)== L:
    for i in range(L):
        if (i != A and S[i] == '-'):
            flag = 0
        if (i == A and S[i] != '-'):
            flag = 0
else:
    flag = 0

if flag == 1:
    print('Yes')
else:
    print('No')