# -*- coding: utf-8 -*-



# AtCoder Beginner Contest

# Problem B



if __name__ == '__main__':

    import re



    A, B = list(map(str, input().split()))

    S = str(eval(input()))



    text = r'\d{' + A + '}\-\d{' + B + '}'

    result = re.match(text, S)



    if result:

        print("Yes")

    else:

        print("No")

# -*- coding: utf-8 -*-





def main():

    a, b = list(map(int, input().split()))

    s = eval(input())



    if s[:a].isdigit() and s[a:a + 1] == '-' and s[a + 1:].isdigit():

        print('Yes')

    else:

        print('No')





if __name__ == '__main__':

    main()

# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem B
if __name__ == "__main__":
    import re

    A, B = list(map(str, input().split()))
    S = str(eval(input()))
    text = r"\d{" + A + "}\-\d{" + B + "}"
    result = re.match(text, S)
    if result:
        print("Yes")
    else:
        print("No")

# -*- coding: utf-8 -*-
def main():
    a, b = list(map(int, input().split()))
    s = eval(input())
    if s[:a].isdigit() and s[a : a + 1] == "-" and s[a + 1 :].isdigit():
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

-# AtCoder Beginner Contest -# Problem B -if __name__ == "__main__": -    import re - -    A, B = list(map(str, input().split())) -    S = str(eval(input())) -    text = r"\d{" + A + "}\-\d{" + B + "}" -    result = re.match(text, S) -    if result: +def main(): +    a, b = list(map(int, input().split())) +    s = eval(input()) +    if s[:a].isdigit() and s[a : a + 1] == "-" and s[a + 1 :].isdigit(): + + +if __name__ == "__main__": +    main()