n,a,b,c,d = gets.split.map(&:to_i) # a<b , a<c , b<d
s = gets.chomp
i = 0
while i < d-1
  if i < n-2 && s[i+2] == "."
    i += 2
  elsif i < n-1 && s[i+1] == "."
    i += 1
  else
    puts "No"
    exit
  end
end
if c < d
  puts "Yes"
elsif c == d
  puts "No"
else
  i = b-2
  m = 0
  while i < c && i < n
    if s[i] == "."
      m += 1
    else
      m = 0
    end
    if m >= 3
      puts "Yes"
      exit
    end
    i += 1
    #p [i,m]
  end
  puts "No"
end
