# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')


def solve():
    n, a, b, c, d = [int(x) for x in input().split()]
    s = input() + '#'
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    
    gg = 0
    y = s.find('##', a)
    if y != -1 and y <= max(c, d) and y > min(a, b):
        gg = 1
    if c > d:
        x = s.find('...', b)
        xd = 1
        if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
        if gg or xd:
            print("No")
        else:
            print("Yes")
    else:
        if gg:
            print("No")
        else:
            print("Yes")

t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()


"""

abc

""" import sys sys from collections import deque, defaultdict from math import sqrt, factorial, gcd def solve():
    n, a, b, c, d = [int(x) for x in input().split()]
    s = input() + '#'
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    
    gg = 0
    y = s.find('##', a)
    if y != -1 and y <= max(c, d) and y > min(a, b):
        gg = 1
    if c > d:
        x = s.find('...', b)
        xd = 1
        if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
        if gg or xd:
            print("No")
        else:
            print("Yes")
    else:
        if gg:
            print("No")
        else:
            print("Yes") solve int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x n, a, b, c, d = [int(x) for x in input().split()] n [int(x) for x in input().split()] a b c d s = input() + '#' s input() + '#' input() input '#' a -= 1 a 1 b -= 1 b 1 c -= 1 c 1 d -= 1 d 1 gg = 0 gg 0 y = s.find('##', a) y s.find('##', a) s.find s find '##' a if y != -1 and y <= max(c, d) and y > min(a, b):
        gg = 1
     y != -1 and y <= max(c, d) and y > min(a, b) y != -1 and y <= max(c, d) y != -1 y -1 y <= max(c, d) y max(c, d) max c d y > min(a, b) y min(a, b) min a b gg = 1 gg 1 if c > d:
        x = s.find('...', b)
        xd = 1
        if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
        if gg or xd:
            print("No")
        else:
            print("Yes")
    else:
        if gg:
            print("No")
        else:
            print("Yes") c > d c d x = s.find('...', b) x s.find('...', b) s.find s find '...' b xd = 1 xd 1 if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
         (s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d) (s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.') s[b + 1] == s[b - 1] and s[b - 1] == '.' s[b + 1] == s[b - 1] s[b + 1] s b + 1 b 1 s[b - 1] s b - 1 b 1 s[b - 1] == '.' s[b - 1] s b - 1 b 1 '.' s[b+1] == s[b+2]  and s[b+1] == '.' s[b+1] == s[b+2] s[b+1] s b+1 b 1 s[b+2] s b+2 b 2 s[b+1] == '.' s[b+1] s b+1 b 1 '.' x != -1 and x + 1 <= d x != -1 x -1 x + 1 <= d x + 1 x 1 d xd = 0 xd 0 if gg or xd:
            print("No")
        else:
            print("Yes")
     gg or xd gg xd print("No") print "No" print("Yes") print "Yes" if gg:
            print("No")
        else:
            print("Yes") gg print("No") print "No" print("Yes") print "Yes" t = 1 t 1 for case in range(1,t+1):
    ans = solve() case range(1,t+1) range 1 t+1 t 1 ans = solve() ans solve() solve """

abc

""" def solve():
    n, a, b, c, d = [int(x) for x in input().split()]
    s = input() + '#'
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    
    gg = 0
    y = s.find('##', a)
    if y != -1 and y <= max(c, d) and y > min(a, b):
        gg = 1
    if c > d:
        x = s.find('...', b)
        xd = 1
        if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
        if gg or xd:
            print("No")
        else:
            print("Yes")
    else:
        if gg:
            print("No")
        else:
            print("Yes") def solve():
    n, a, b, c, d = [int(x) for x in input().split()]
    s = input() + '#'
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    
    gg = 0
    y = s.find('##', a)
    if y != -1 and y <= max(c, d) and y > min(a, b):
        gg = 1
    if c > d:
        x = s.find('...', b)
        xd = 1
        if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
        if gg or xd:
            print("No")
        else:
            print("Yes")
    else:
        if gg:
            print("No")
        else:
            print("Yes") solve ans = solve() solve() ans t = 1 1 t
# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')


def solve():
    n, a, b, c, d = [int(x) for x in input().split()]
    s = input() + '#'
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    
    gg = 0
    y = s.find('##', a)
    if y != -1 and y <= max(c, d) and y > min(a, b):
        gg = 1
    if c > d:
        x = s.find('...', b)
        xd = 1
        if ((s[b + 1] == s[b - 1] and s[b - 1] == '.') 
            or (s[b+1] == s[b+2]  and s[b+1] == '.')
            or (x != -1 and x + 1 <= d)):
            xd = 0
        if gg or xd:
            print("No")
        else:
            print("Yes")
    else:
        if gg:
            print("No")
        else:
            print("Yes")

t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()


"""

abc

"""
