import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None)






N,A,B,C,D=l()
S=input()
if '##' in S[min(A, B)-1:max(D, C)]:
    print('No')
    quit()
 
if C < D:
    print('Yes')
else:
    if '...' in S[B-2:D+1]:
        print('Yes')
        quit()
    print('No') import sys sys from functools import lru_cache, cmp_to_key from heapq import merge, heapify, heappop, heappush from math import * from collections import defaultdict as dd, deque, Counter as C from itertools import combinations as comb, permutations as perm from bisect import bisect_left as bl, bisect_right as br, bisect from time import perf_counter from fractions import Fraction mod = int(pow(10, 9) + 7) mod int(pow(10, 9) + 7) int pow(10, 9) + 7 pow(10, 9) pow 10 9 7 mod2 = 998244353 mod2 998244353 def data(): return sys.stdin.readline().strip() data def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end) out end="\n" end "\n" *var def l(): return list(sp()) l def sl(): return list(ssp()) sl def sp(): return map(int, data().split()) sp def ssp(): return map(str, data().split()) ssp val for i in range(n) for i in range(n) i range(n) range n for i in range(n) val def l1d(n, val=0): return [val for i in range(n)] l1d n n val=0 val 0 l1d(n, val) for j in range(m) for j in range(m) j range(m) range m for j in range(m) l1d(n, val) l1d n val def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None) l2d n n m m val=0 val 0 N,A,B,C,D=l() N l() l A B C D S=input() S input() input if '##' in S[min(A, B)-1:max(D, C)]:
    print('No')
    quit()
  '##' in S[min(A, B)-1:max(D, C)] '##' S[min(A, B)-1:max(D, C)] S min(A, B)-1:max(D, C) min(A, B)-1 min(A, B) min A B 1 max(D, C) max D C print('No') print 'No' quit() quit if C < D:
    print('Yes')
else:
    if '...' in S[B-2:D+1]:
        print('Yes')
        quit()
    print('No') C < D C D print('Yes') print 'Yes' if '...' in S[B-2:D+1]:
        print('Yes')
        quit()
     '...' in S[B-2:D+1] '...' S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 print('Yes') print 'Yes' quit() quit print('No') print 'No' def sp(): return map(int, data().split()) def sp(): return map(int, data().split()) sp def l(): return list(sp()) def l(): return list(sp()) l A,B,C,D=l() l() A C,D=l() l() C def sl(): return list(ssp()) def sl(): return list(ssp()) sl def ssp(): return map(str, data().split()) def ssp(): return map(str, data().split()) ssp mod = int(pow(10, 9) + 7) int(pow(10, 9) + 7) mod def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None) def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None) l2d B,C,D=l() l() B mod2 = 998244353 998244353 mod2 def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end) def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end) out D=l() l() D def data(): return sys.stdin.readline().strip() def data(): return sys.stdin.readline().strip() data S=input() input() S def l1d(n, val=0): return [val for i in range(n)] def l1d(n, val=0): return [val for i in range(n)] l1d N,A,B,C,D=l() l() N
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None)






N,A,B,C,D=l()
S=input()
if '##' in S[min(A, B)-1:max(D, C)]:
    print('No')
    quit()
 
if C < D:
    print('Yes')
else:
    if '...' in S[B-2:D+1]:
        print('Yes')
        quit()
    print('No')
