n, a, b, c, d = gets.chomp!.split(" ").map(&:to_i)
s = "##{gets.chomp!}#"

if c < b # a < c < b < d
    if [
        s[a, c-a].include?("##"),
        s[b, d-b].include?("##")
    ].any?
        puts "No"
    else
        puts "Yes"
    end
elsif c < d # a < b < c < d
    if s[a, d-a].include?("##")
        puts "No"
    else
=begin
        pos = b - a >=2 ? b - 2: a
        puts pos
        puts c+2-pos
        if s[pos, c+2-pos].include?("...")
            puts "YES4"
        else
            puts "NO5"
        end
=end
        puts "Yes"
    end
else # a < b < d < c
    if s[a, c-a].include?("##")
        puts "No"
    else
        pos, len = b - a >= 2 ? b - 2: a
        if s[pos, d+2-pos].include?("...")
            puts "Yes"
        else
            puts "No"
        end
    end
end
