a,b = map(int,input().split())
N = input()
p = 1
for i in range(a):
    if N[i] == "0" or "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
        p += 1
    else:
        p = 0
        break
if N[a] == "-":
    p += 1
else:
    p = 0
for j in range(b):
    if N[j] == "0" or "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
        p += 1
    else:
        p = 0
        break
if p > 0:
    print("Yes")
else:
    print("No")