n, s0, s1, g0, g1 = gets.split.map(&:to_i)
s = gets.chomp

s[s1-1] = 'f'
# s[g1] = 'g'
# p [s[s0,g0-s0],s[s1,g1-s1]]
if s[s0,g0-s0].index("##") || s[s1,g1-s1].index("##")
  
  puts "No"
  exit
end

f = s[s1-2, g1-s1+1]
# p f
if g0 > g1 && !( f.index("...") || f.index(".f.") || f.index("f..")  )
  puts "No"
  exit
end

puts "Yes"