a=int(input()[0]);s=eval(input());print(('YNeos'[s.count('-')!=1or'-'<s[a]::2]))
a,s=open(0);print(('YNeos'[s.count('-')!=1or'-'<s[int(a[0])]::2]))
a = int(input()[0])
s = eval(input())
print(("YNeos"[s.count("-") != 1 or "-" < s[a] :: 2]))

a, s = open(0)
print(("YNeos"[s.count("-") != 1 or "-" < s[int(a[0])] :: 2]))

-a = int(input()[0]) -s = eval(input()) -print(("YNeos"[s.count("-") != 1 or "-" < s[a] :: 2])) +a, s = open(0) +print(("YNeos"[s.count("-") != 1 or "-" < s[int(a[0])] :: 2]))