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 = map(int, input().split())
S = input().split('-')

if len(S) == 2 and len(S[0]) == a:
    print('yes')
else:
    print('no')
a, b = map(int, input().split())
S = input().split('-')

if len(S) == 2 and len(S[0]) == a:
    print('Yes')
else:
    print('No')