import sys
N, *AB = [int(x) for x in input().split()]
As, Bs, Ag, Bg = map(lambda x : x - 1, AB)
S = input()
for (s, g) in [(As, Ag), (Bs, Bg)]:
    if '##' in S[s : g + 1]:
        print("No")
        sys.exit()

if Bg < Ag:  # AがBを飛び越える必要がある
    if '...' not in S[Bs - 1 : Bg + 2]:
        print("No")
        sys.exit()

print("Yes") import sys sys int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, *AB = [int(x) for x in input().split()] N [int(x) for x in input().split()] *AB AB As, Bs, Ag, Bg = map(lambda x : x - 1, AB) As map(lambda x : x - 1, AB) map lambda x : x - 1 x - 1 x 1 x AB Bs Ag Bg S = input() S input() input for (s, g) in [(As, Ag), (Bs, Bg)]:
    if '##' in S[s : g + 1]:
        print("No")
        sys.exit() (s, g) s g [(As, Ag), (Bs, Bg)] (As, Ag) As Ag (Bs, Bg) Bs Bg if '##' in S[s : g + 1]:
        print("No")
        sys.exit() '##' in S[s : g + 1] '##' S[s : g + 1] S s : g + 1 s g + 1 g 1 print("No") print "No" sys.exit() sys.exit sys exit if Bg < Ag:  # AがBを飛び越える必要がある
    if '...' not in S[Bs - 1 : Bg + 2]:
        print("No")
        sys.exit() Bg < Ag Bg Ag if '...' not in S[Bs - 1 : Bg + 2]:
        print("No")
        sys.exit() '...' not in S[Bs - 1 : Bg + 2] '...' S[Bs - 1 : Bg + 2] S Bs - 1 : Bg + 2 Bs - 1 Bs 1 Bg + 2 Bg 2 print("No") print "No" sys.exit() sys.exit sys exit print("Yes") print "Yes" N, *AB = [int(x) for x in input().split()] [int(x) for x in input().split()] N As, Bs, Ag, Bg = map(lambda x : x - 1, AB) map(lambda x : x - 1, AB) As Bs, Ag, Bg = map(lambda x : x - 1, AB) map(lambda x : x - 1, AB) Bs S = input() input() S Bg = map(lambda x : x - 1, AB) map(lambda x : x - 1, AB) Bg Ag, Bg = map(lambda x : x - 1, AB) map(lambda x : x - 1, AB) Ag
import sys
N, *AB = [int(x) for x in input().split()]
As, Bs, Ag, Bg = map(lambda x : x - 1, AB)
S = input()
for (s, g) in [(As, Ag), (Bs, Bg)]:
    if '##' in S[s : g + 1]:
        print("No")
        sys.exit()

if Bg < Ag:  # AがBを飛び越える必要がある
    if '...' not in S[Bs - 1 : Bg + 2]:
        print("No")
        sys.exit()

print("Yes")