n,a,b,c,d = gets.split.map(&:to_i)
S = gets.chomp
if S.include?("##")
    puts "No"
    exit
end
if c<d
    puts "Yes"
else
    if S[b-2..d-1].include?("...")
        puts "Yes"
    else
        puts "No"
    end
end