import re

def validate(a, b, s):
    pattern = "\\d{%d}-\\d{%d}"%(a, b)
    print(pattern)
    m = re.match(pattern, s)
    return m is not None



if __name__ == "__main__":
    a, b = map(int, input().split())
    s = input()
    if validate(a, b, s):
        print("Yes")
    else:
        print("No")