import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, a, b, c, d = inintm()
s = input()

if c < d:
    if "##" not in s[a-1:d-1]:
        print("Yes")
    else:
        print("No")
else:
    if ("..." in s[b-2:d+1]) and ("##" not in s[a-1:c-1]):
        print("Yes")
    else:
        print("No") import sys sys inint = lambda: int(sys.stdin.readline()) inint lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline inintm = lambda: map(int, sys.stdin.readline().split()) inintm lambda: map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split inintl = lambda: list(inintm()) inintl lambda: list(inintm()) list(inintm()) list inintm() inintm instrm = lambda: map(str, sys.stdin.readline().split()) instrm lambda: map(str, sys.stdin.readline().split()) map(str, sys.stdin.readline().split()) map str sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split instrl = lambda: list(instrm()) instrl lambda: list(instrm()) list(instrm()) list instrm() instrm n, a, b, c, d = inintm() n inintm() inintm a b c d s = input() s input() input if c < d:
    if "##" not in s[a-1:d-1]:
        print("Yes")
    else:
        print("No")
else:
    if ("..." in s[b-2:d+1]) and ("##" not in s[a-1:c-1]):
        print("Yes")
    else:
        print("No") c < d c d if "##" not in s[a-1:d-1]:
        print("Yes")
    else:
        print("No") "##" not in s[a-1:d-1] "##" s[a-1:d-1] s a-1:d-1 a-1 a 1 d-1 d 1 print("Yes") print "Yes" print("No") print "No" if ("..." in s[b-2:d+1]) and ("##" not in s[a-1:c-1]):
        print("Yes")
    else:
        print("No") ("..." in s[b-2:d+1]) and ("##" not in s[a-1:c-1]) "..." in s[b-2:d+1] "..." s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 "##" not in s[a-1:c-1] "##" s[a-1:c-1] s a-1:c-1 a-1 a 1 c-1 c 1 print("Yes") print "Yes" print("No") print "No" inintm = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) inintm c, d = inintm() inintm() c b, c, d = inintm() inintm() b s = input() input() s a, b, c, d = inintm() inintm() a instrl = lambda: list(instrm()) lambda: list(instrm()) instrl instrm = lambda: map(str, sys.stdin.readline().split()) lambda: map(str, sys.stdin.readline().split()) instrm inint = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) inint inintl = lambda: list(inintm()) lambda: list(inintm()) inintl d = inintm() inintm() d n, a, b, c, d = inintm() inintm() n
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, a, b, c, d = inintm()
s = input()

if c < d:
    if "##" not in s[a-1:d-1]:
        print("Yes")
    else:
        print("No")
else:
    if ("..." in s[b-2:d+1]) and ("##" not in s[a-1:c-1]):
        print("Yes")
    else:
        print("No")
