n, a, b, c, d  = map(int, input().split())
s = input()
ans = 'Yes'
if '##' in s[a-1:max(c,d)]:
    ans = 'No'
else:
    if c > d and '...' not in s[b-2:d+1]:
        ans = 'No'
print(ans) n, a, b, c, d  = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split a b c d s = input() s input() input ans = 'Yes' ans 'Yes' if '##' in s[a-1:max(c,d)]:
    ans = 'No'
else:
    if c > d and '...' not in s[b-2:d+1]:
        ans = 'No' '##' in s[a-1:max(c,d)] '##' s[a-1:max(c,d)] s a-1:max(c,d) a-1 a 1 max(c,d) max c d ans = 'No' ans 'No' if c > d and '...' not in s[b-2:d+1]:
        ans = 'No' c > d and '...' not in s[b-2:d+1] c > d c d '...' not in s[b-2:d+1] '...' s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 ans = 'No' ans 'No' print(ans) print ans c, d  = map(int, input().split()) map(int, input().split()) c n, a, b, c, d  = map(int, input().split()) map(int, input().split()) n s = input() input() s a, b, c, d  = map(int, input().split()) map(int, input().split()) a ans = 'Yes' 'Yes' ans b, c, d  = map(int, input().split()) map(int, input().split()) b ans = 'No' 'No' ans ans = 'No' 'No' ans d  = map(int, input().split()) map(int, input().split()) d
n, a, b, c, d  = map(int, input().split())
s = input()
ans = 'Yes'
if '##' in s[a-1:max(c,d)]:
    ans = 'No'
else:
    if c > d and '...' not in s[b-2:d+1]:
        ans = 'No'
print(ans)