n, a, b, c, d = gets.split.map(&:to_i)
ss = gets.split('').map{|e| e=='#' ? true : false}
overlap = c > d

f_single = false
double_stone_flag = (ss[(b-1)..([c,d].min-1)].select{|e|
  f_double = f_single && e
  f_single = e
  f_double
}).size.positive?
f_single = false
f_double = false
triple_dots_flag = (ss[(b-1)..(d)].select{|e|
  f_triple = f_double && !e
  f_double = f_single && !e
  f_single = !e
  f_triple
}).size.positive?

if c < d
  puts double_stone_flag ? 'No' : 'Yes'
else
  puts !double_stone_flag && triple_dots_flag ? 'Yes' : 'No'
end
