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

flg = 0
cnt = 0
S_ac = S[A:C]
S_bd = S[B:D]

if '##' in S_ac or '##' in S_bd:
    flg = 1

if D < C and flg == 0:
    S = S[B-2:D+1]
    if '...' not in S:
        flg = 1

if flg == 1:
    print('No')
else:
    print('Yes') 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 flg = 0 flg 0 cnt = 0 cnt 0 S_ac = S[A:C] S_ac S[A:C] S A:C A C S_bd = S[B:D] S_bd S[B:D] S B:D B D if '##' in S_ac or '##' in S_bd:
    flg = 1 '##' in S_ac or '##' in S_bd '##' in S_ac '##' S_ac '##' in S_bd '##' S_bd flg = 1 flg 1 if D < C and flg == 0:
    S = S[B-2:D+1]
    if '...' not in S:
        flg = 1 D < C and flg == 0 D < C D C flg == 0 flg 0 S = S[B-2:D+1] S S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 if '...' not in S:
        flg = 1 '...' not in S '...' S flg = 1 flg 1 if flg == 1:
    print('No')
else:
    print('Yes') flg == 1 flg 1 print('No') print 'No' print('Yes') print 'Yes' 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 C,D = map(int,input().split()) map(int,input().split()) C D = map(int,input().split()) map(int,input().split()) D flg = 1 1 flg S_bd = S[B:D] S[B:D] S_bd N,A,B,C,D = map(int,input().split()) map(int,input().split()) N S = S[B-2:D+1] S[B-2:D+1] S S = input() input() S flg = 0 0 flg cnt = 0 0 cnt S_ac = S[A:C] S[A:C] S_ac flg = 1 1 flg
N,A,B,C,D = map(int,input().split())
S = input()

flg = 0
cnt = 0
S_ac = S[A:C]
S_bd = S[B:D]

if '##' in S_ac or '##' in S_bd:
    flg = 1

if D < C and flg == 0:
    S = S[B-2:D+1]
    if '...' not in S:
        flg = 1

if flg == 1:
    print('No')
else:
    print('Yes')