def main():
    A, B = map(int, input().split())
    S = input()
    digit = [str(a) for a in range(10)]
    collect = True
    for i in range(len(S)):
        if i == A:
            if S[i] != "-":
                collect = False
                break
        else:
            if i not in digit:
                collect = False
                break
    if collect == True:
        print("Yes")
    else:
        print("No")
main()