#=$<.read.split.map(&:to_i)
N,A,B,C,D=gets.split.map(&:to_i)
S='-' + gets.chomp

left = [A,B].min
right = [C,D].min

i = left+1
while left < i && i < right
  if S[i..i+1] == '##'
    puts 'No'
    exit 0
  end
  i += 1
end

if C < D
  puts 'Yes'
  exit 0
end

left = [A,B].max
i = left+1
f = false
while left < i && i < right-2
  if S[i..i+2] == '...'
    f = true
  end
  i += 1
end