n,a,b,c,d=list(map(int,input().split()));s=eval(input());print(('YNeos'[not'...'in s[b-2:d+1]and d<c or'##'in s[a:c]+s[b:d]::2]))
n,a,b,c,d=list(map(int,input().split()));s=eval(input());print(('YNeos'[not'...'*(d<c)in s[b-2:d+1]or'##'in s[a:c]+s[b:d]::2]))
n, a, b, c, d = list(map(int, input().split()))
s = eval(input())
print(
    ("YNeos"[not "..." in s[b - 2 : d + 1] and d < c or "##" in s[a:c] + s[b:d] :: 2])
)

n, a, b, c, d = list(map(int, input().split()))
s = eval(input())
print(
    ("YNeos"[not "..." * (d < c) in s[b - 2 : d + 1] or "##" in s[a:c] + s[b:d] :: 2])
)

-    ("YNeos"[not "..." in s[b - 2 : d + 1] and d < c or "##" in s[a:c] + s[b:d] :: 2]) +    ("YNeos"[not "..." * (d < c) in s[b - 2 : d + 1] or "##" in s[a:c] + s[b:d] :: 2])