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

if c < d
    puts s[a..c] =~ /##/ || s[b..d] =~ /##/ ? "No" : "Yes"
else
    puts s[a..c] =~ /##/ || !(s[b-1..d+1] =~ /\.\.\./) ? "No" : "Yes"
end