# -*- coding: utf-8 -*-
A, B = map(int, input().split())
S = input()
if A<1 or B<1:
    print("No")
elif len(S)!=(A+B+1):
    print("No")
elif S[A]!="-":
    print("No")
else:
    s = S.replace("-", "")
    if s.isdigit():
        print("Yes")
    else:
        print("No")
