The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen `-`, and the other characters are digits from `0` through `9`.  You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.
a, b = [int(i) for i in input().split()]
content = input()

if len(content) == a + b + 1:
    A = content[:a]
    B = content[-b:]
    hyphn = content[a]
    print(A, B)
    if A.isdecimal() and B.isdecimal() and hyphn == '-':
        print('Yes')
    else :
        print('No')

a, b = [int(i) for i in input().split()]
content = input()

if len(content) == a + b + 1:
    A = content[:a]
    B = content[-b:]
    hyphn = content[a]
    if A.isdecimal() and B.isdecimal() and hyphn == '-':
        print('Yes')
    else :
        print('No')
