def main():
    a, b = map(int, raw_input().split())
    s = raw_input()

    if len(s) == a+b+1 and  s[:a].isdigit() and s[a] == "-" and s[a+1:].isdigit():
        print "Yes"
    else:
        print "No"
    

if __name__=="__main__":
    main()
