nums = "1234567890"
a, b = map(int, input().split())
s = input()
ok_flg = True
for i in range(a):
    if s[i] not in nums:
        ok_flg = False
        break
print(s[a])
if s[a] != "-":
    ok_flg = False
for j in range(b):
    if s[a + 1 + j] not in nums:
        ok_flg = False
        break
if ok_flg == True:
    print("Yes")
else:
    print("No")
