A, B = map(int, input().split())
S = list(input())
n = len(S)

if n != 8:
    print('No')
    exit()
for i in range(n):
    if i == 3:
        if S[i] == '-':
            continue
        else:
            break
    if not S[i].isdigit():
        break
else:
    print('Yes')
    exit()
print('No')