import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

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

if C < D:
    if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1:
        print('Yes')
    else:
        print('No')
else:
    if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1 and S[B-2:D+1].find('...') != -1:
        print('Yes')
    else:
        print('No') import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10**8) sys.setrecursionlimit sys setrecursionlimit 10**8 10 8 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 INF = 10**18 INF 10**18 10 18 eps = 10**-7 eps 10**-7 10 -7 N,A,B,C,D = map(int,readline().split()) N map(int,readline().split()) map int readline().split() ().split () readline split A B C D S = readline().rstrip() S readline().rstrip() ().rstrip () readline rstrip if C < D:
    if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1:
        print('Yes')
    else:
        print('No')
else:
    if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1 and S[B-2:D+1].find('...') != -1:
        print('Yes')
    else:
        print('No') C < D C D if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1:
        print('Yes')
    else:
        print('No') S[B-1:D].find('##') == -1 and S[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 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 print('Yes') print 'Yes' print('No') print 'No' if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1 and S[B-2:D+1].find('...') != -1:
        print('Yes')
    else:
        print('No') S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1 and S[B-2:D+1].find('...') != -1 S[B-1:D].find('##') == -1 and S[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 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-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 print('Yes') print 'Yes' print('No') print 'No' A,B,C,D = map(int,readline().split()) map(int,readline().split()) A INF = 10**18 10**18 INF N,A,B,C,D = map(int,readline().split()) map(int,readline().split()) N D = map(int,readline().split()) map(int,readline().split()) D B,C,D = map(int,readline().split()) map(int,readline().split()) B mod = 10**9+7 10**9+7 mod eps = 10**-7 10**-7 eps readline = sys.stdin.readline sys.stdin.readline readline S = readline().rstrip() readline().rstrip() S C,D = map(int,readline().split()) map(int,readline().split()) C
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

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

if C < D:
    if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1:
        print('Yes')
    else:
        print('No')
else:
    if S[B-1:D].find('##') == -1 and S[A-1:C].find('##') == -1 and S[B-2:D+1].find('...') != -1:
        print('Yes')
    else:
        print('No')
