# -coding: utf-8 -

a, b = map(int, input().split())
s = input()

if s[a] != "-":
    isNo = True
else:
    try:
        int(s[:a])
    except:
        isNo = True

    try:
        int(s[a:])
    except:
        isNo = True

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