import bisect,copy,heapq,itertools,string
from collections import *
from math import *
import sys
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, a, b, c, d = MAP()
s = 'a' + input()

flag = 0
for i in range(min(a,b)+1,max(c,d)):
        if (a < i < c or b < i < d) and s[i] == s[i-1] == '#':
                print("No")
                exit()       
        elif max(a,b) <= i <= min(c,d) and s[i-1] == s[i] == s[i+1] == '.':
                flag = 1

if c > d and flag == 0:
        print("No")
else:
        print("Yes") import bisect,copy,heapq,itertools,string bisect copy heapq itertools string from collections import * from math import * import sys sys def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST n, a, b, c, d = MAP() n MAP() MAP a b c d s = 'a' + input() s 'a' + input() 'a' input() input flag = 0 flag 0 for i in range(min(a,b)+1,max(c,d)):
        if (a < i < c or b < i < d) and s[i] == s[i-1] == '#':
                print("No")
                exit()       
        elif max(a,b) <= i <= min(c,d) and s[i-1] == s[i] == s[i+1] == '.':
                flag = 1 i range(min(a,b)+1,max(c,d)) range min(a,b)+1 min(a,b) min a b 1 max(c,d) max c d if (a < i < c or b < i < d) and s[i] == s[i-1] == '#':
                print("No")
                exit()       
        elif max(a,b) <= i <= min(c,d) and s[i-1] == s[i] == s[i+1] == '.':
                flag = 1 (a < i < c or b < i < d) and s[i] == s[i-1] == '#' a < i < c or b < i < d a < i < c a < i a i c b < i < d b < i b i d s[i] == s[i-1] == '#' s[i] == s[i-1] s[i] s i s[i-1] s i-1 i 1 '#' print("No") print "No" exit() exit elif max(a,b) <= i <= min(c,d) and s[i-1] == s[i] == s[i+1] == '.':
                flag = 1 max(a,b) <= i <= min(c,d) and s[i-1] == s[i] == s[i+1] == '.' max(a,b) <= i <= min(c,d) max(a,b) <= i max(a,b) max a b i min(c,d) min c d s[i-1] == s[i] == s[i+1] == '.' s[i-1] == s[i] == s[i+1] s[i-1] == s[i] s[i-1] s i-1 i 1 s[i] s i s[i+1] s i+1 i 1 '.' flag = 1 flag 1 if c > d and flag == 0:
        print("No")
else:
        print("Yes") c > d and flag == 0 c > d c d flag == 0 flag 0 print("No") print "No" print("Yes") print "Yes" def INT()   : return int(input()) def INT()   : return int(input()) INT def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST b, c, d = MAP() MAP() b d = MAP() MAP() d flag = 1 1 flag flag = 0 0 flag def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP c, d = MAP() MAP() c n, a, b, c, d = MAP() MAP() n a, b, c, d = MAP() MAP() a s = 'a' + input() 'a' + input() s
import bisect,copy,heapq,itertools,string
from collections import *
from math import *
import sys
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, a, b, c, d = MAP()
s = 'a' + input()

flag = 0
for i in range(min(a,b)+1,max(c,d)):
        if (a < i < c or b < i < d) and s[i] == s[i-1] == '#':
                print("No")
                exit()       
        elif max(a,b) <= i <= min(c,d) and s[i-1] == s[i] == s[i+1] == '.':
                flag = 1

if c > d and flag == 0:
        print("No")
else:
        print("Yes")