# coding: utf-8

import re

A, B = list(map(int, input().split()))

S = eval(input())



if S[A] != "-":

    print("No")

else:

    if "-" in S[0:A] or "-" in S[A+1:]:

        print("No")

    else:

        print("Yes")
# coding: utf-8

A, B = list(map(int, input().split()))

S = eval(input())

 

if S[A] != "-":

    print("No")

else:

    if "-" in S[0:A] or "-" in S[A+1:]:

        print("No")

    else:

        print("Yes")
# coding: utf-8
import re

A, B = list(map(int, input().split()))
S = eval(input())
if S[A] != "-":
    print("No")
else:
    if "-" in S[0:A] or "-" in S[A + 1 :]:
        print("No")
    else:
        print("Yes")

# coding: utf-8
A, B = list(map(int, input().split()))
S = eval(input())
if S[A] != "-":
    print("No")
else:
    if "-" in S[0:A] or "-" in S[A + 1 :]:
        print("No")
    else:
        print("Yes")

-import re -