n,a,b,c,d=map(int,input().split())
s=input()
flag=0
for i in range(n):
  if a-1<=i<=c-1 or b-1<=i<=d-1:
    if flag==1 and s[i]=="#":
      print("No")
      exit()
    elif flag==0 and s[i]=="#":
      flag=1
    elif s[i]==".":
      flag=0

m=0
con=0
if d<c:
  for i in range(b-2,d+1):
    if s[i]==".":
      con+=1
      m=max(m,con)
    else:
      con=0
  if m>=3:
    print("Yes")
    exit()
  else:
    print("No")
    exit()
print("Yes") 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 flag=0 flag 0 for i in range(n):
  if a-1<=i<=c-1 or b-1<=i<=d-1:
    if flag==1 and s[i]=="#":
      print("No")
      exit()
    elif flag==0 and s[i]=="#":
      flag=1
    elif s[i]==".":
      flag=0 i range(n) range n if a-1<=i<=c-1 or b-1<=i<=d-1:
    if flag==1 and s[i]=="#":
      print("No")
      exit()
    elif flag==0 and s[i]=="#":
      flag=1
    elif s[i]==".":
      flag=0 a-1<=i<=c-1 or b-1<=i<=d-1 a-1<=i<=c-1 a-1<=i a-1 a 1 i c-1 c 1 b-1<=i<=d-1 b-1<=i b-1 b 1 i d-1 d 1 if flag==1 and s[i]=="#":
      print("No")
      exit()
    elif flag==0 and s[i]=="#":
      flag=1
    elif s[i]==".":
      flag=0 flag==1 and s[i]=="#" flag==1 flag 1 s[i]=="#" s[i] s i "#" print("No") print "No" exit() exit elif flag==0 and s[i]=="#":
      flag=1
     flag==0 and s[i]=="#" flag==0 flag 0 s[i]=="#" s[i] s i "#" flag=1 flag 1 elif s[i]==".":
      flag=0 s[i]=="." s[i] s i "." flag=0 flag 0 m=0 m 0 con=0 con 0 if d<c:
  for i in range(b-2,d+1):
    if s[i]==".":
      con+=1
      m=max(m,con)
    else:
      con=0
  if m>=3:
    print("Yes")
    exit()
  else:
    print("No")
    exit() d<c d c for i in range(b-2,d+1):
    if s[i]==".":
      con+=1
      m=max(m,con)
    else:
      con=0
   i range(b-2,d+1) range b-2 b 2 d+1 d 1 if s[i]==".":
      con+=1
      m=max(m,con)
    else:
      con=0
   s[i]=="." s[i] s i "." con+=1 con 1 m=max(m,con) m max(m,con) max m con con=0 con 0 if m>=3:
    print("Yes")
    exit()
  else:
    print("No")
    exit() m>=3 m 3 print("Yes") print "Yes" exit() exit print("No") print "No" exit() exit print("Yes") print "Yes" con=0 0 con m=max(m,con) max(m,con) m s=input() input() s flag=0 0 flag a,b,c,d=map(int,input().split()) map(int,input().split()) a d=map(int,input().split()) map(int,input().split()) d flag=1 1 flag flag=0 0 flag b,c,d=map(int,input().split()) map(int,input().split()) b con=0 0 con con+=1 1 con n,a,b,c,d=map(int,input().split()) map(int,input().split()) n c,d=map(int,input().split()) map(int,input().split()) c m=0 0 m
n,a,b,c,d=map(int,input().split())
s=input()
flag=0
for i in range(n):
  if a-1<=i<=c-1 or b-1<=i<=d-1:
    if flag==1 and s[i]=="#":
      print("No")
      exit()
    elif flag==0 and s[i]=="#":
      flag=1
    elif s[i]==".":
      flag=0

m=0
con=0
if d<c:
  for i in range(b-2,d+1):
    if s[i]==".":
      con+=1
      m=max(m,con)
    else:
      con=0
  if m>=3:
    print("Yes")
    exit()
  else:
    print("No")
    exit()
print("Yes")