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

ret = if C<D
        !S[A..B].include?('##') && !S[C..D].include?('##')
      else
        !S[A..C].include?('##') && S[B-1..D+1].include?('...')
end

puts (ret ? 'Yes' : 'No')
