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+1].include?("##"),
        s[b, d-b+1].include?("##")
    ].any?
        puts "No"
    else
        puts "Yes"
    end
elsif c < d # a < b < c < d
    if s[a, d-a+1].include?("##")
        puts "No"
    else
        puts "Yes"
    end
else # a < b < d < c
    if s[a, c-a+1].include?("##")
        puts "No"
    else
        head = [b-2, a].max
        tail = [b+2, c].min
        if s[head, tail-head+1].include?("...")
            puts "Yes"
        else
            puts "No"
        end
    end
end
