# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

def pd(str)
  p str if $debugFlag
end

# input
inputs = []
lc = 0
while l = $stdin.gets do
  if lc == 1
    inputs << l.chomp.split(" ").map(&:to_s)
  else
    inputs << l.chomp.split(" ").map(&:to_i)
  end
  lc += 1
end

# input check
if $debugFlag
  p "--- INPUT (begin) ---"
  inputs.each do |l_i|
    p l_i
  end
  p "--- INPUT (end) ---"
  print "\n"
end

nn = inputs[0][0]
aa = inputs[0][1]-1
bb = inputs[0][2]-1
cc = inputs[0][3]-1
dd = inputs[0][4]-1
rd = inputs[1]

# body
if $debugFlag
  p nn
  p aa
  p bb
  p cc
  p dd
  p rd
end

def can_goal?(chk)
  return false if chk[-1] == '#'
  ans = true
  (chk.length-1).times do |i|
    if chk[i..i+1] == "##"
      ans = false
      break
    end
  end
  return ans
end

bb_goals_first = false
tmp = can_goal?(rd[bb+1..dd])
if tmp
  chk = rd.clone
  chk[dd] = '#'
  bb_goals_first = can_goal?(chk[aa+1..cc])
end

bb_goals_last = false
aa_ovtk_bb = false
for (rd[bb..dd].length-2).times do |i|
  if rd[i..i+2] == '...'
    aa_ovtk_bb = true
    break
  end
end
if aa_ovtk_bb
  tmp = can_goal?(rd[aa+1..cc])
  if tmp
    chk = rd.clone
    chk[cc] = '#'
    bb_goals_last = can_goal?(chk[bb..dd])
  end
end

if bb_goals_first or bb_goals_last
  puts "Yes"
else
  puts "No"
end
