N,A,B,C,D = map(int,input().split())
S = list(input().strip())
S.insert(0,0)
if C<D:
    flag = 0
    for i in range(A+1,C+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
    for i in range(B+1,D+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
    if flag==0:
        print("Yes")
    else:
        print("No")
else:
    flag = 0
    for i in range(A+1,C+1):
        if S[i]=="#" and S[i-1]=="#":
            flag = 1
            break
    if flag == 0:
        flag1 = 1
        for i in range(B,D+1):
            if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":
                flag1 = 0
                break
        if flag1==1:
            flag = 1
    if flag==0:
        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 = list(input().strip()) S list(input().strip()) list input().strip() ().strip () input strip S.insert(0,0) S.insert S insert 0 0 if C<D:
    flag = 0
    for i in range(A+1,C+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
    for i in range(B+1,D+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
    if flag==0:
        print("Yes")
    else:
        print("No")
else:
    flag = 0
    for i in range(A+1,C+1):
        if S[i]=="#" and S[i-1]=="#":
            flag = 1
            break
    if flag == 0:
        flag1 = 1
        for i in range(B,D+1):
            if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":
                flag1 = 0
                break
        if flag1==1:
            flag = 1
    if flag==0:
        print("Yes")
    else:
        print("No") C<D C D flag = 0 flag 0 for i in range(A+1,C+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
     i range(A+1,C+1) range A+1 A 1 C+1 C 1 if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
     S[i-1]=="#" and S[i]=="#" S[i-1]=="#" S[i-1] S i-1 i 1 "#" S[i]=="#" S[i] S i "#" flag = 1 flag 1 break for i in range(B+1,D+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
     i range(B+1,D+1) range B+1 B 1 D+1 D 1 if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
     S[i-1]=="#" and S[i]=="#" S[i-1]=="#" S[i-1] S i-1 i 1 "#" S[i]=="#" S[i] S i "#" flag = 1 flag 1 break if flag==0:
        print("Yes")
    else:
        print("No") flag==0 flag 0 print("Yes") print "Yes" print("No") print "No" flag = 0 flag 0 for i in range(A+1,C+1):
        if S[i]=="#" and S[i-1]=="#":
            flag = 1
            break
     i range(A+1,C+1) range A+1 A 1 C+1 C 1 if S[i]=="#" and S[i-1]=="#":
            flag = 1
            break
     S[i]=="#" and S[i-1]=="#" S[i]=="#" S[i] S i "#" S[i-1]=="#" S[i-1] S i-1 i 1 "#" flag = 1 flag 1 break if flag == 0:
        flag1 = 1
        for i in range(B,D+1):
            if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":
                flag1 = 0
                break
        if flag1==1:
            flag = 1
     flag == 0 flag 0 flag1 = 1 flag1 1 for i in range(B,D+1):
            if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":
                flag1 = 0
                break
         i range(B,D+1) range B D+1 D 1 if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":
                flag1 = 0
                break
         i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]=="." i+1<=N and S[i-1]=="." and S[i]=="." i+1<=N and S[i-1]=="." i+1<=N i+1 i 1 N S[i-1]=="." S[i-1] S i-1 i 1 "." S[i]=="." S[i] S i "." S[i+1]=="." S[i+1] S i+1 i 1 "." flag1 = 0 flag1 0 break if flag1==1:
            flag = 1
     flag1==1 flag1 1 flag = 1 flag 1 if flag==0:
        print("Yes")
    else:
        print("No") flag==0 flag 0 print("Yes") print "Yes" print("No") print "No" D = map(int,input().split()) map(int,input().split()) D flag = 1 1 flag flag = 1 1 flag A,B,C,D = map(int,input().split()) map(int,input().split()) A N,A,B,C,D = map(int,input().split()) map(int,input().split()) N flag1 = 1 1 flag1 flag = 0 0 flag flag = 1 1 flag flag1 = 0 0 flag1 S = list(input().strip()) list(input().strip()) S B,C,D = map(int,input().split()) map(int,input().split()) B C,D = map(int,input().split()) map(int,input().split()) C flag = 0 0 flag flag = 1 1 flag
N,A,B,C,D = map(int,input().split())
S = list(input().strip())
S.insert(0,0)
if C<D:
    flag = 0
    for i in range(A+1,C+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
    for i in range(B+1,D+1):
        if S[i-1]=="#" and S[i]=="#":
            flag = 1
            break
    if flag==0:
        print("Yes")
    else:
        print("No")
else:
    flag = 0
    for i in range(A+1,C+1):
        if S[i]=="#" and S[i-1]=="#":
            flag = 1
            break
    if flag == 0:
        flag1 = 1
        for i in range(B,D+1):
            if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":
                flag1 = 0
                break
        if flag1==1:
            flag = 1
    if flag==0:
        print("Yes")
    else:
        print("No")