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