#!/usr/bin/env python3
# -*- coding: utf-8 -*-
N,A,B,C,D = map(int,input().split())
s = list(input())
ok = False

# AC間、BD間、に連続した岩がなければ良い
#print (s)
for i in range(A-1,C):
#    print (s[i-1:i+1])
    if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()

#print (s)
for i in range(B-1,D):
#    print (s[i-1:i+1])
    if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()


# C > D の場合
# BD間に連続した3つの空きがあれば良い
if C < D:
    ok = True
else:
#    print (s)
    for i in range(B-1,D):
#        print (s[i-1:i+2])
        if s[i-1:i+2] == [".",".","."]:
            ok = True
            break

if ok:
    print ("Yes")
else:
    print ("No") 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 s = list(input()) s list(input()) list input() input ok = False ok False for i in range(A-1,C):
#    print (s[i-1:i+1])
    if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()

#print (s) i range(A-1,C) range A-1 A 1 C if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()

#print (s) s[i-1:i+1] == ["#","#"] s[i-1:i+1] s i-1:i+1 i-1 i 1 i+1 i 1 ["#","#"] "#" "#" print ("No") print "No" exit () exit for i in range(B-1,D):
#    print (s[i-1:i+1])
    if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()


# C > D の場合
# BD間に連続した3つの空きがあれば良い i range(B-1,D) range B-1 B 1 D if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()


# C > D の場合
# BD間に連続した3つの空きがあれば良い s[i-1:i+1] == ["#","#"] s[i-1:i+1] s i-1:i+1 i-1 i 1 i+1 i 1 ["#","#"] "#" "#" print ("No") print "No" exit () exit if C < D:
    ok = True
else:
#    print (s)
    for i in range(B-1,D):
#        print (s[i-1:i+2])
        if s[i-1:i+2] == [".",".","."]:
            ok = True
            break C < D C D ok = True ok True for i in range(B-1,D):
#        print (s[i-1:i+2])
        if s[i-1:i+2] == [".",".","."]:
            ok = True
            break i range(B-1,D) range B-1 B 1 D if s[i-1:i+2] == [".",".","."]:
            ok = True
            break s[i-1:i+2] == [".",".","."] s[i-1:i+2] s i-1:i+2 i-1 i 1 i+2 i 2 [".",".","."] "." "." "." ok = True ok True break if ok:
    print ("Yes")
else:
    print ("No") ok print ("Yes") print "Yes" print ("No") print "No" D = map(int,input().split()) map(int,input().split()) D N,A,B,C,D = map(int,input().split()) map(int,input().split()) N A,B,C,D = map(int,input().split()) map(int,input().split()) A B,C,D = map(int,input().split()) map(int,input().split()) B ok = False False ok s = list(input()) list(input()) s ok = True True ok ok = True True ok C,D = map(int,input().split()) map(int,input().split()) C
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
N,A,B,C,D = map(int,input().split())
s = list(input())
ok = False

# AC間、BD間、に連続した岩がなければ良い
#print (s)
for i in range(A-1,C):
#    print (s[i-1:i+1])
    if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()

#print (s)
for i in range(B-1,D):
#    print (s[i-1:i+1])
    if s[i-1:i+1] == ["#","#"]:
        print ("No")
        exit ()


# C > D の場合
# BD間に連続した3つの空きがあれば良い
if C < D:
    ok = True
else:
#    print (s)
    for i in range(B-1,D):
#        print (s[i-1:i+2])
        if s[i-1:i+2] == [".",".","."]:
            ok = True
            break

if ok:
    print ("Yes")
else:
    print ("No")
