a,b = map(int,input().split())
S = input()
ans = True
for s in range(a+b+1):
    if s == a:
        if S[s] != "-":
            ans = False
    if s != a:
        if S[s] == "-":
            ans = False
print(ans)