from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

n,a,b,c,d = readInts()
a-=1
b-=1
c-=1
d-=1
s = readChar()
if (a-b)*(c-d)<0:
  if "..." in s[b-1:d+2] and "##" not in s[a:c]:
    print("Yes")
  else:
    print("No")
else:
  if "##" not in s[a:d+1]:
    print("Yes")
  else:
    print("No") from collections import defaultdict from collections import deque from collections import Counter import itertools itertools import math math def readInt():
  return int(input()) readInt return int(input()) int(input()) int input() input def readInts():
  return list(map(int, input().split())) readInts return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def readChar():
  return input() readChar return input() input() input def readChars():
  return input().split() readChars return input().split() input().split() ().split () input split n,a,b,c,d = readInts() n readInts() readInts a b c d a-=1 a 1 b-=1 b 1 c-=1 c 1 d-=1 d 1 s = readChar() s readChar() readChar if (a-b)*(c-d)<0:
  if "..." in s[b-1:d+2] and "##" not in s[a:c]:
    print("Yes")
  else:
    print("No")
else:
  if "##" not in s[a:d+1]:
    print("Yes")
  else:
    print("No") (a-b)*(c-d)<0 (a-b)*(c-d) a-b a b c-d c d 0 if "..." in s[b-1:d+2] and "##" not in s[a:c]:
    print("Yes")
  else:
    print("No") "..." in s[b-1:d+2] and "##" not in s[a:c] "..." in s[b-1:d+2] "..." s[b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 "##" not in s[a:c] "##" s[a:c] s a:c a c print("Yes") print "Yes" print("No") print "No" if "##" not in s[a:d+1]:
    print("Yes")
  else:
    print("No") "##" not in s[a:d+1] "##" s[a:d+1] s a:d+1 a d+1 d 1 print("Yes") print "Yes" print("No") print "No" def readChars():
  return input().split() def readChars():
  return input().split() readChars a,b,c,d = readInts() readInts() a c,d = readInts() readInts() c b-=1 1 b def readChar():
  return input() def readChar():
  return input() readChar d-=1 1 d n,a,b,c,d = readInts() readInts() n def readInt():
  return int(input()) def readInt():
  return int(input()) readInt def readInts():
  return list(map(int, input().split())) def readInts():
  return list(map(int, input().split())) readInts a-=1 1 a c-=1 1 c b,c,d = readInts() readInts() b d = readInts() readInts() d s = readChar() readChar() s
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

n,a,b,c,d = readInts()
a-=1
b-=1
c-=1
d-=1
s = readChar()
if (a-b)*(c-d)<0:
  if "..." in s[b-1:d+2] and "##" not in s[a:c]:
    print("Yes")
  else:
    print("No")
else:
  if "##" not in s[a:d+1]:
    print("Yes")
  else:
    print("No")