n,a,b,c,d=gets.split.map(&:to_i)
s=gets.chomp.to_s

if c<d
    if /##/===s[a-1..d-1]
        puts "No"
    else
     puts "Yes"
     end
else
    if /##/===s[a-1..d-1]
       puts "No"
       #追い越すための区間
    elsif /[.]{3}/===s[b-2..d]
        puts "Yes"
    else
        puts "No"
    end
   
end