N, a, b, C, D = gets.split.map(&:to_i)
S = gets.chomp

if C < D
  ans = 'Yes'
  (([a-1,b-1].min)..[N-2, D-2].min).each do |i|
    if S[i..(i+1)] == '##'
      ans = 'No'
      break
    end
  end
else
  ans = 'No'
  (([a-1,b-1].min)..[N-3, C-3].min).each do |i|
    if S[i..(i+2)] == '...'
      ans = 'Yes'
    end
  end
  (([a-1,b-1].min)..[N-2, C-2].min).each do |i|
    if S[i..(i+1)] == '##'
      ans = 'No'
      break
    end
  end
end
puts ans
