import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n,a,b,c,d = LI()
    s = "#" + S()
    ans = True
    if a<b and b<c and c<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
    elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
    print("Yes" if ans else "No")
    
main()             import bisect,collections,copy,itertools,math,string bisect collections copy itertools math string import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS def main():
    n,a,b,c,d = LI()
    s = "#" + S()
    ans = True
    if a<b and b<c and c<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
    elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
    print("Yes" if ans else "No")
     main n,a,b,c,d = LI() n LI() LI a b c d s = "#" + S() s "#" + S() "#" S() S ans = True ans True if a<b and b<c and c<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
    elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
     a<b and b<c and c<d a<b and b<c a<b a b b<c b c c<d c d ans &= "##" not in  s[b:d] ans "##" not in  s[b:d] "##" s[b:d] s b:d b d ans &= "##" not in  s[a:c] ans "##" not in  s[a:c] "##" s[a:c] s a:c a c elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
     a<b and b<d and d<c a<b and b<d a<b a b b<d b d d<c d c ans &= "##" not in  s[b:d] ans "##" not in  s[b:d] "##" s[b:d] s b:d b d ans &= "..." in s[b-1:d+2] ans "..." in s[b-1:d+2] "..." s[b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 ans &= "##" not in  s[a:c] ans "##" not in  s[a:c] "##" s[a:c] s a:c a c elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
     a<c and c<b and b<d a<c and c<b a<c a c c<b c b b<d b d ans &= "##" not in  s[b:d] ans "##" not in  s[b:d] "##" s[b:d] s b:d b d ans &= "##" not in  s[a:c] ans "##" not in  s[a:c] "##" s[a:c] s a:c a c print("Yes" if ans else "No") print "Yes" if ans else "No" ans "Yes" "No" main() main def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def main():
    n,a,b,c,d = LI()
    s = "#" + S()
    ans = True
    if a<b and b<c and c<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
    elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
    print("Yes" if ans else "No")
     def main():
    n,a,b,c,d = LI()
    s = "#" + S()
    ans = True
    if a<b and b<c and c<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
    elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
    print("Yes" if ans else "No")
     main def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n,a,b,c,d = LI()
    s = "#" + S()
    ans = True
    if a<b and b<c and c<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    elif a<b and b<d and d<c:
        ans &= "##" not in  s[b:d]
        ans &= "..." in s[b-1:d+2]
        ans &= "##" not in  s[a:c]
    elif a<c and c<b and b<d:
        ans &= "##" not in  s[b:d]
        ans &= "##" not in  s[a:c]
    
    print("Yes" if ans else "No")
    
main()            
