import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N,A,B,C,D = I()
maze = s()
Flag = 0
for i in range(A,max(C,D)):
    if maze[i-1:i+1] == '##':
        print('No')
        exit()
if C < D:
    print('Yes')
    exit()
for i in range(B-1,D):
    if maze[i-1:i+2] == '...':
        print('Yes')
        exit()
print('No') import sys sys import math math import itertools itertools import bisect bisect from copy import copy,deepcopy from collections import deque,Counter from decimal import Decimal def s(): return input() s def i(): return int(input()) i def S(): return input().split() S def I(): return map(int,input().split()) I def L(): return list(map(int,input().split())) L def l(): return list(map(int,input().split())) l def lcm(a,b): return a*b//math.gcd(a,b) lcm a a b b sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 10**9 INF 10**9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 N,A,B,C,D = I() N I() I A B C D maze = s() maze s() s Flag = 0 Flag 0 for i in range(A,max(C,D)):
    if maze[i-1:i+1] == '##':
        print('No')
        exit() i range(A,max(C,D)) range A max(C,D) max C D if maze[i-1:i+1] == '##':
        print('No')
        exit() maze[i-1:i+1] == '##' maze[i-1:i+1] maze i-1:i+1 i-1 i 1 i+1 i 1 '##' print('No') print 'No' exit() exit if C < D:
    print('Yes')
    exit() C < D C D print('Yes') print 'Yes' exit() exit for i in range(B-1,D):
    if maze[i-1:i+2] == '...':
        print('Yes')
        exit() i range(B-1,D) range B-1 B 1 D if maze[i-1:i+2] == '...':
        print('Yes')
        exit() maze[i-1:i+2] == '...' maze[i-1:i+2] maze i-1:i+2 i-1 i 1 i+2 i 2 '...' print('Yes') print 'Yes' exit() exit print('No') print 'No' INF = 10**9 10**9 INF Flag = 0 0 Flag def S(): return input().split() def S(): return input().split() S def i(): return int(input()) def i(): return int(input()) i def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l def I(): return map(int,input().split()) def I(): return map(int,input().split()) I mod = 10**9+7 10**9+7 mod def s(): return input() def s(): return input() s N,A,B,C,D = I() I() N C,D = I() I() C def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm B,C,D = I() I() B D = I() I() D maze = s() s() maze A,B,C,D = I() I() A def L(): return list(map(int,input().split())) def L(): return list(map(int,input().split())) L
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N,A,B,C,D = I()
maze = s()
Flag = 0
for i in range(A,max(C,D)):
    if maze[i-1:i+1] == '##':
        print('No')
        exit()
if C < D:
    print('Yes')
    exit()
for i in range(B-1,D):
    if maze[i-1:i+2] == '...':
        print('Yes')
        exit()
print('No')