import sys
import math
import itertools
import bisect
from copy import copy
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 X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N,A,B,C,D = I()
S = s()
if "##" in S[A-1:C] or "##" in S[B-1:D]:
    print("No")
else:
    if C > D and "..." not in S[B-2:D+1]:
        print("No")
    else:
        print("Yes") import sys sys import math math import itertools itertools import bisect bisect from copy import copy 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 X(): return list(input()) X def L(): return list(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 def gcd(*numbers): reduce(math.gcd, numbers) gcd *numbers sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 count = 0 count 0 ans = 0 ans 0 N,A,B,C,D = I() N I() I A B C D S = s() S s() s if "##" in S[A-1:C] or "##" in S[B-1:D]:
    print("No")
else:
    if C > D and "..." not in S[B-2:D+1]:
        print("No")
    else:
        print("Yes") "##" in S[A-1:C] or "##" in S[B-1:D] "##" in S[A-1:C] "##" S[A-1:C] S A-1:C A-1 A 1 C "##" in S[B-1:D] "##" S[B-1:D] S B-1:D B-1 B 1 D print("No") print "No" if C > D and "..." not in S[B-2:D+1]:
        print("No")
    else:
        print("Yes") C > D and "..." not in S[B-2:D+1] C > D C D "..." not in S[B-2:D+1] "..." S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 print("No") print "No" print("Yes") print "Yes" def gcd(*numbers): reduce(math.gcd, numbers) def gcd(*numbers): reduce(math.gcd, numbers) gcd def L(): return list(input().split()) def L(): return list(input().split()) L def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l A,B,C,D = I() I() A N,A,B,C,D = I() I() N ans = 0 0 ans C,D = I() I() C D = I() I() D mod = 10**9+7 10**9+7 mod def I(): return map(int,input().split()) def I(): return map(int,input().split()) I def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm S = s() s() S def i(): return int(input()) def i(): return int(input()) i B,C,D = I() I() B def s(): return input() def s(): return input() s def S(): return input().split() def S(): return input().split() S count = 0 0 count def X(): return list(input()) def X(): return list(input()) X
import sys
import math
import itertools
import bisect
from copy import copy
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 X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N,A,B,C,D = I()
S = s()
if "##" in S[A-1:C] or "##" in S[B-1:D]:
    print("No")
else:
    if C > D and "..." not in S[B-2:D+1]:
        print("No")
    else:
        print("Yes")
