# vim: set fileencoding=utf-8:


def main():
    A, B = map(int, raw_input().split())
    S = raw_input()

    if len(S) == A + B + 1 and S[A] == "-" and S[0:A].isalnum() and S[A + 1:].isalnum():
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
