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

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