N,A,B,C,D = map(int,input().split())
S=input()
ans="Yes"

if D<C:
  triple = S[B-2:D+1].count("...")
  if triple ==0:
    ans="No"

double= S[A-1:max(C,D)].count("##")
if double > 0:
  ans="No"
  
print(ans) 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 ans="Yes" ans "Yes" if D<C:
  triple = S[B-2:D+1].count("...")
  if triple ==0:
    ans="No" D<C D C triple = S[B-2:D+1].count("...") triple S[B-2:D+1].count("...") [B-2:D+1].count [B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 count "..." if triple ==0:
    ans="No" triple ==0 triple 0 ans="No" ans "No" double= S[A-1:max(C,D)].count("##") double S[A-1:max(C,D)].count("##") [A-1:max(C,D)].count [A-1:max(C,D)] S A-1:max(C,D) A-1 A 1 max(C,D) max C D count "##" if double > 0:
  ans="No"
   double > 0 double 0 ans="No" ans "No" print(ans) print ans C,D = map(int,input().split()) map(int,input().split()) C D = map(int,input().split()) map(int,input().split()) D triple = S[B-2:D+1].count("...") S[B-2:D+1].count("...") triple double= S[A-1:max(C,D)].count("##") S[A-1:max(C,D)].count("##") double ans="Yes" "Yes" ans 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 S=input() input() S B,C,D = map(int,input().split()) map(int,input().split()) B ans="No" "No" ans ans="No" "No" ans
N,A,B,C,D = map(int,input().split())
S=input()
ans="Yes"

if D<C:
  triple = S[B-2:D+1].count("...")
  if triple ==0:
    ans="No"

double= S[A-1:max(C,D)].count("##")
if double > 0:
  ans="No"
  
print(ans)