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 = list(map(int,input().split()))
s = input()
num = s[:a] + s[a+1]
print('Yes' if s[a+1] == '-' and len(s) == a+b+1 and ('-' not in num) else 'No')

a,b = list(map(int,input().split()))
s = input()
num = s[:a] + s[a+1]
print('Yes' if s[a] == '-' and len(s) == a+b+1 and ('-' not in num) else 'No')
