import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N,A,B,C,D = MI()
S = ['#'] + LS2()

for i in range(A,C):
    if S[i] == S[i+1] == '#':
        print('No')
        exit()
for i in range(B,D):
    if S[i] == S[i+1] == '#':
        print('No')
        exit()

if C < D:  # 追い越ししなくてよい
    print('Yes')
else:  # 追い越し必要
    for i in range(B,D+1):
        if S[i-1] == S[i] == S[i+1] == '.':
            print('Yes')
            break
    else:
        print('No') import sys sys def MI(): return map(int,sys.stdin.readline().rstrip().split()) MI def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし LS2 N,A,B,C,D = MI() N MI() MI A B C D S = ['#'] + LS2() S ['#'] + LS2() ['#'] '#' LS2() LS2 for i in range(A,C):
    if S[i] == S[i+1] == '#':
        print('No')
        exit() i range(A,C) range A C if S[i] == S[i+1] == '#':
        print('No')
        exit() S[i] == S[i+1] == '#' S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 '#' print('No') print 'No' exit() exit for i in range(B,D):
    if S[i] == S[i+1] == '#':
        print('No')
        exit() i range(B,D) range B D if S[i] == S[i+1] == '#':
        print('No')
        exit() S[i] == S[i+1] == '#' S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 '#' print('No') print 'No' exit() exit if C < D:  # 追い越ししなくてよい
    print('Yes')
else:  # 追い越し必要
    for i in range(B,D+1):
        if S[i-1] == S[i] == S[i+1] == '.':
            print('Yes')
            break
    else:
        print('No') C < D C D print('Yes') print 'Yes' for i in range(B,D+1):
        if S[i-1] == S[i] == S[i+1] == '.':
            print('Yes')
            break
    else:
        print('No') i range(B,D+1) range B D+1 D 1 if S[i-1] == S[i] == S[i+1] == '.':
            print('Yes')
            break
     S[i-1] == S[i] == S[i+1] == '.' S[i-1] == S[i] == S[i+1] S[i-1] == S[i] S[i-1] S i-1 i 1 S[i] S i S[i+1] S i+1 i 1 '.' print('Yes') print 'Yes' break print('No') print 'No' A,B,C,D = MI() MI() A S = ['#'] + LS2() ['#'] + LS2() S C,D = MI() MI() C D = MI() MI() D def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし LS2 def MI(): return map(int,sys.stdin.readline().rstrip().split()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) MI N,A,B,C,D = MI() MI() N B,C,D = MI() MI() B
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N,A,B,C,D = MI()
S = ['#'] + LS2()

for i in range(A,C):
    if S[i] == S[i+1] == '#':
        print('No')
        exit()
for i in range(B,D):
    if S[i] == S[i+1] == '#':
        print('No')
        exit()

if C < D:  # 追い越ししなくてよい
    print('Yes')
else:  # 追い越し必要
    for i in range(B,D+1):
        if S[i-1] == S[i] == S[i+1] == '.':
            print('Yes')
            break
    else:
        print('No')
