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

if D < C
  flag = false
  (b-1).upto(D-1) do |i|
    if S[(i-1)..(i+1)].join == '...'
      flag = true
      break
    end
  end
  if !flag
    puts ans
    exit
  end
end
while a <= C && b <= D
  if b != D
    if S[b] == '.'
      b += 1
    elsif S[b+1] == '.'
      b += 2
    else
      break
    end
  else
    if S[a] == '.'
      a += 1
    elsif S[a+1] == '.'
      a += 2
    else
      break
    end
  end
  if a == C && b == D
    ans = 'Yes'
    break
  end
end

puts ans