a, b = list(map(int, input().split()))

S = eval(input())



if "-" in S[:a] or  "-" in S[a+1:]:

    print("No")

elif "-" == S[a]:

    print("Yes")

else:

    print("No")

a, b = list(map(int, input().split()))

S = eval(input())



for i in range(len(S)):

  if (i == a and S[i] != "-") or (i != a and S[i] =="-"):

    print("No")

    exit()

print("Yes")
a, b = list(map(int, input().split()))
S = eval(input())
if "-" in S[:a] or "-" in S[a + 1 :]:
    print("No")
elif "-" == S[a]:
    print("Yes")
else:
    print("No")

a, b = list(map(int, input().split()))
S = eval(input())
for i in range(len(S)):
    if (i == a and S[i] != "-") or (i != a and S[i] == "-"):
        print("No")
        exit()
print("Yes")

-if "-" in S[:a] or "-" in S[a + 1 :]: -    print("No") -elif "-" == S[a]: -    print("Yes") -else: -    print("No") +for i in range(len(S)): +    if (i == a and S[i] != "-") or (i != a and S[i] == "-"): +        print("No") +        exit() +print("Yes")