import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n,a,b,c,d=map(int,input().split())
    s=input()
    for i in range(a,max(c,d)):
        if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
    else:
        if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No")

if __name__=='__main__':
    main() import sys sys def input(): return sys.stdin.readline().rstrip() input def main():
    n,a,b,c,d=map(int,input().split())
    s=input()
    for i in range(a,max(c,d)):
        if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
    else:
        if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No") main 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=input() s input() input for i in range(a,max(c,d)):
        if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
    else:
        if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No") i range(a,max(c,d)) range a max(c,d) max c d if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
     i+2<=n i+2 i 2 n if s[i:i+2]=='##':
                print("No")
                break
     s[i:i+2]=='##' s[i:i+2] s i:i+2 i i+2 i 2 '##' print("No") print "No" break if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No") c<d c d print("Yes") print "Yes" flag=False flag False for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
             i range(b-1,d) range b-1 b 1 d if s[i-1:i+2]=="...":
                    flag=True
             s[i-1:i+2]=="..." s[i-1:i+2] s i-1:i+2 i-1 i 1 i+2 i 2 "..." flag=True flag True if flag==True:
                print("Yes")
            else:
                print("No") flag==True flag True print("Yes") print "Yes" print("No") print "No" if __name__=='__main__':
    main() __name__=='__main__' __name__ '__main__' main() main def main():
    n,a,b,c,d=map(int,input().split())
    s=input()
    for i in range(a,max(c,d)):
        if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
    else:
        if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No") def main():
    n,a,b,c,d=map(int,input().split())
    s=input()
    for i in range(a,max(c,d)):
        if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
    else:
        if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No") main def input(): return sys.stdin.readline().rstrip() def input(): return sys.stdin.readline().rstrip() input
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n,a,b,c,d=map(int,input().split())
    s=input()
    for i in range(a,max(c,d)):
        if i+2<=n:
            if s[i:i+2]=='##':
                print("No")
                break
    else:
        if c<d:
            print("Yes")
        else:
            flag=False
            for i in range(b-1,d):    
                if s[i-1:i+2]=="...":
                    flag=True
            if flag==True:
                print("Yes")
            else:
                print("No")

if __name__=='__main__':
    main()