def main():
    import sys
    input = sys.stdin.readline
    a, b = map(int, input().rstrip('\n').split())
    s = input().rstrip('\n')
    ls = list("1234567890")
    for i in list(s[:a]):
        if i not in ls:
            print("No")
            exit()
    for i in list(s[b:]):
        if i not in ls:
            print("No")
            exit()
    if s[a] != "-":
        print("No")
        exit()
    print("Yes")


if __name__ == '__main__':
    main()
