n,a,b,c,d=map(int,input().split())
s=str(input())

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

if c<d:
    if s[min(a,b)-1:d+1].count("##")==0:
        print("Yes")
    else:
        print("No")
else:
    if s[min(a,b)-1:d+1].count("##")==0:
        if s[max(a,b)-2:d+1].count("...")==0:
            print("No")
        else:
            print("Yes")
    else:
        print("No")
