N, *ABCD = gets.split.map &:to_i
A, B, C, D = ABCD.map &:pred
S = gets.chomp

if S[A+1..C-1]['##'] || S[B+1..D-1]['##']
  puts :No
elsif C < D
  puts :Yes
elsif S[B-1..D]['...']
  puts :Yes
else
  puts :No
end