# coding: utf-8
import re
A, B = map(int, input().split())
S = input()

if S[A] != "-":
    print("No")
else:
    if S[0:A] in "-" or S[A+1:] in "-":
        print("No")
    else:
        print("Yes")