def kenken(place, others, map)
  if(map[place + 1] == "." && place + 1 != others) then
    #puts 1
    return 1
  elsif(map[place + 2] == "." && place + 2 != others) then
    #puts 2
    return 2
  else
    #puts 0
    return 0
  end
end

  arr = gets.split(" ")
  map = gets
  n = arr.shift.to_i - 1
  a = arr.shift.to_i - 1
  b = arr.shift.to_i - 1
  c = arr.shift.to_i - 1
  d = arr.shift.to_i - 1

  if(d > c) then
    #puts "aaa"
    while(b <= n) do
      if(kenken(b, a, map) == 0) then
        puts "No"
        return
      end
      b += kenken(b, a, map)
#      puts "b is"
#      puts b
      if(b == d) then
        while(a <= c) do
          if(kenken(a, b,map) == 0) then
            puts "No"
            return
          end
          a += kenken(a, b, map)
#          puts "a is"
#          puts a
          if(a == c) then
            puts "Yes"
            return
          end
        end
      end
    end
    puts "Error"
    return
  else
#    puts "bbb"
    while(a <= n) do
      while(kenken(a, b, map) != 0) do
        a += kenken(a, b, map)
#        puts "a is"
#        puts a
        if(a == c) then
          puts "Yes"
          return
        end
      end
      if(kenken(b, a, map) != 0 && b != d) then
        b += kenken(b, a, map)
#        puts "b is"
#        puts b
      else
        puts "No"
        return
      end
    end
  end
  puts "Error"
  return
