numbers = gets.chomp.split(' ').map(&:to_i)
@s = gets.chomp.split('').map(&:to_s)
@n = numbers.first
@a = numbers[1]
@b = numbers[2]
@c = numbers[3]
@d = numbers[4]
@abcd = [@a, @b, @c, @d]
@output = 'Yes'

def ng
  @output = 'No'
end

# @return Bool
def double_rock_between_min_and_max
  @s.each_with_index do |v, i|
    next if (@abcd.min > i + 1 || @abcd.max < i + 1)
    return true if (v == '#' && @s[i + 1] == '#')
  end
  return false
end

# Exists triple empty between C and D
# @return Bool
def exists_triple
  @s.each_with_index do |_, i|
    next if ((i + 1 < @b - 1) || (i + 1 > @d - 1))
    return true if ([@s[i], @s[i + 1], @s[i + 2]] == ['.', '.', '.'])
  end
  return false
end

if @c == @d || double_rock_between_min_and_max
  ng
elsif @c < @d
elsif @c > @d
  ng unless exists_triple
end


print @output