N, A, B, C, D = map(int, input().split())
S = input()

if S[A-1:C].find('##') != -1 or S[B-1:D].find('##') != -1:
    print('No')
    exit()

ans = 'Yes'
if C > D and S[B-2:D+1].find('...') == -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 if S[A-1:C].find('##') != -1 or S[B-1:D].find('##') != -1:
    print('No')
    exit() S[A-1:C].find('##') != -1 or S[B-1:D].find('##') != -1 S[A-1:C].find('##') != -1 S[A-1:C].find('##') [A-1:C].find [A-1:C] S A-1:C A-1 A 1 C find '##' -1 S[B-1:D].find('##') != -1 S[B-1:D].find('##') [B-1:D].find [B-1:D] S B-1:D B-1 B 1 D find '##' -1 print('No') print 'No' exit() exit ans = 'Yes' ans 'Yes' if C > D and S[B-2:D+1].find('...') == -1:
    ans = 'No' C > D and S[B-2:D+1].find('...') == -1 C > D C D S[B-2:D+1].find('...') == -1 S[B-2:D+1].find('...') [B-2:D+1].find [B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 find '...' -1 ans = 'No' ans 'No' print(ans) print ans A, B, C, D = map(int, input().split()) map(int, input().split()) A B, C, D = map(int, input().split()) map(int, input().split()) B S = input() input() S ans = 'Yes' 'Yes' ans ans = 'No' 'No' ans D = map(int, input().split()) map(int, input().split()) D N, A, B, C, D = map(int, input().split()) map(int, input().split()) N C, D = map(int, input().split()) map(int, input().split()) C
N, A, B, C, D = map(int, input().split())
S = input()

if S[A-1:C].find('##') != -1 or S[B-1:D].find('##') != -1:
    print('No')
    exit()

ans = 'Yes'
if C > D and S[B-2:D+1].find('...') == -1:
    ans = 'No'
print(ans)
