# ABC084B - Postal Code
def main():
    A, B = tuple(map(int, input().split()))
    S = input().rstrip()
    flg = S[A] == "-" and all(i in "0123456789" for i in S[:A] + S[A + 1 :])
    print("YES" if flg else "NO")


if __name__ == "__main__":
    main()