n,a,b,c,d=map(int,input().split())
s="0"+input()
x=s[a:c+1]
y=s[b:d+1]
if "##" in s[a:c+1]:
    print("No")
    exit()

if "##" in s[b:d+1]:
    print("No")
    exit()

if c>d:
    if not "..." in s[b-1:d+2]:
        print("No")
        exit()
    
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 s="0"+input() s "0"+input() "0" input() input x=s[a:c+1] x s[a:c+1] s a:c+1 a c+1 c 1 y=s[b:d+1] y s[b:d+1] s b:d+1 b d+1 d 1 if "##" in s[a:c+1]:
    print("No")
    exit() "##" in s[a:c+1] "##" s[a:c+1] s a:c+1 a c+1 c 1 print("No") print "No" exit() exit if "##" in s[b:d+1]:
    print("No")
    exit() "##" in s[b:d+1] "##" s[b:d+1] s b:d+1 b d+1 d 1 print("No") print "No" exit() exit if c>d:
    if not "..." in s[b-1:d+2]:
        print("No")
        exit()
     c>d c d if not "..." in s[b-1:d+2]:
        print("No")
        exit()
     not "..." in s[b-1:d+2] "..." in s[b-1:d+2] "..." s[b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 print("No") print "No" exit() exit print("Yes") print "Yes" c,d=map(int,input().split()) map(int,input().split()) c b,c,d=map(int,input().split()) map(int,input().split()) b y=s[b:d+1] s[b:d+1] y x=s[a:c+1] s[a:c+1] x 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 d=map(int,input().split()) map(int,input().split()) d s="0"+input() "0"+input() s
n,a,b,c,d=map(int,input().split())
s="0"+input()
x=s[a:c+1]
y=s[b:d+1]
if "##" in s[a:c+1]:
    print("No")
    exit()

if "##" in s[b:d+1]:
    print("No")
    exit()

if c>d:
    if not "..." in s[b-1:d+2]:
        print("No")
        exit()
    
print("Yes")