# -*- coding: utf-8 -*-
N, A, B, C, D = map(int, input().split(' '))
A -= 1
B -= 1
C -= 1
D -= 1


S = input()
if S[A:C+1].count('##') or S[B:D+1].count('##'):
    print('No')
    exit(0)

if C > D:
    if not S[B-1: D+2].count('...'):
        print('No')
        exit(0)

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 A -= 1 A 1 B -= 1 B 1 C -= 1 C 1 D -= 1 D 1 S = input() S input() input if S[A:C+1].count('##') or S[B:D+1].count('##'):
    print('No')
    exit(0) S[A:C+1].count('##') or S[B:D+1].count('##') S[A:C+1].count('##') [A:C+1].count [A:C+1] S A:C+1 A C+1 C 1 count '##' S[B:D+1].count('##') [B:D+1].count [B:D+1] S B:D+1 B D+1 D 1 count '##' print('No') print 'No' exit(0) exit 0 if C > D:
    if not S[B-1: D+2].count('...'):
        print('No')
        exit(0) C > D C D if not S[B-1: D+2].count('...'):
        print('No')
        exit(0) not S[B-1: D+2].count('...') S[B-1: D+2].count('...') [B-1: D+2].count [B-1: D+2] S B-1: D+2 B-1 B 1 D+2 D 2 count '...' print('No') print 'No' exit(0) exit 0 print('Yes') print 'Yes' B, C, D = map(int, input().split(' ')) map(int, input().split(' ')) B A, B, C, D = map(int, input().split(' ')) map(int, input().split(' ')) A C, D = map(int, input().split(' ')) map(int, input().split(' ')) C C -= 1 1 C S = input() input() S N, A, B, C, D = map(int, input().split(' ')) map(int, input().split(' ')) N D -= 1 1 D B -= 1 1 B D = map(int, input().split(' ')) map(int, input().split(' ')) D A -= 1 1 A
# -*- coding: utf-8 -*-
N, A, B, C, D = map(int, input().split(' '))
A -= 1
B -= 1
C -= 1
D -= 1


S = input()
if S[A:C+1].count('##') or S[B:D+1].count('##'):
    print('No')
    exit(0)

if C > D:
    if not S[B-1: D+2].count('...'):
        print('No')
        exit(0)

print('Yes')
















