import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, a, b, c, d = rm()
s = rr()
three = '...' in s[max(0, b-2):min(n-1, d+1)]
sha = '##'in s[b-1:d]
sha1 = '##' in s[a-1:c]
if c < d:
    if sha or sha1:
        print('No')
    else:
        print('Yes')
elif not sha and three and not sha1:
    print('Yes')
else:
    print('No')






 import sys sys import math math import itertools itertools import collections collections import heapq heapq import re re import numpy as np numpy rr = lambda: sys.stdin.readline().rstrip() rr lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip rs = lambda: sys.stdin.readline().split() rs lambda: sys.stdin.readline().split() sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split ri = lambda: int(sys.stdin.readline()) ri lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rm = lambda: map(int, sys.stdin.readline().split()) rm lambda: map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split rl = lambda: list(map(int, sys.stdin.readline().split())) rl lambda: list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split inf = float('inf') inf float('inf') float 'inf' mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 n, a, b, c, d = rm() n rm() rm a b c d s = rr() s rr() rr three = '...' in s[max(0, b-2):min(n-1, d+1)] three '...' in s[max(0, b-2):min(n-1, d+1)] '...' s[max(0, b-2):min(n-1, d+1)] s max(0, b-2):min(n-1, d+1) max(0, b-2) max 0 b-2 b 2 min(n-1, d+1) min n-1 n 1 d+1 d 1 sha = '##'in s[b-1:d] sha '##'in s[b-1:d] '##' s[b-1:d] s b-1:d b-1 b 1 d sha1 = '##' in s[a-1:c] sha1 '##' in s[a-1:c] '##' s[a-1:c] s a-1:c a-1 a 1 c if c < d:
    if sha or sha1:
        print('No')
    else:
        print('Yes')
elif not sha and three and not sha1:
    print('Yes')
else:
    print('No') c < d c d if sha or sha1:
        print('No')
    else:
        print('Yes') sha or sha1 sha sha1 print('No') print 'No' print('Yes') print 'Yes' elif not sha and three and not sha1:
    print('Yes') not sha and three and not sha1 not sha and three not sha sha three not sha1 sha1 print('Yes') print 'Yes' print('No') print 'No' ri = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) ri sha1 = '##' in s[a-1:c] '##' in s[a-1:c] sha1 rl = lambda: list(map(int, sys.stdin.readline().split())) lambda: list(map(int, sys.stdin.readline().split())) rl inf = float('inf') float('inf') inf a, b, c, d = rm() rm() a s = rr() rr() s rr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() rr three = '...' in s[max(0, b-2):min(n-1, d+1)] '...' in s[max(0, b-2):min(n-1, d+1)] three c, d = rm() rm() c rm = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) rm sha = '##'in s[b-1:d] '##'in s[b-1:d] sha mod = 10**9 + 7 10**9 + 7 mod rs = lambda: sys.stdin.readline().split() lambda: sys.stdin.readline().split() rs d = rm() rm() d n, a, b, c, d = rm() rm() n b, c, d = rm() rm() b
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, a, b, c, d = rm()
s = rr()
three = '...' in s[max(0, b-2):min(n-1, d+1)]
sha = '##'in s[b-1:d]
sha1 = '##' in s[a-1:c]
if c < d:
    if sha or sha1:
        print('No')
    else:
        print('Yes')
elif not sha and three and not sha1:
    print('Yes')
else:
    print('No')







