n,m=map(int,input().split())
inl=list(input())
print(inl)
try:
    for t in range(n):
        int(inl[t])
    for s in range(m):
        int(inl[n+1+s])
    if inl[n]=="-":
        print("Yes")
    else:
        print("No")
except Exception as e:
    print("No")