import sys
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

#n = int(stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
n,a,b,c,d = map(int, stdin.readline().rstrip().split())
#numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
#word = [stdin.readline().rstrip() for _ in range(n)]
#number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
#zeros = [[0] * w for i in range(h)]
s = str(stdin.readline().rstrip())

if "##" in s[a-1:c] or "##" in s[b-1:d]:
    print("No")
else:
    if c < d:
        print("Yes")
    else:
        if "..." in s[b-2:d+1]:
            print("Yes")
        else:
            print("No") import sys sys stdin = sys.stdin stdin sys.stdin sys stdin sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 MIN = -10 ** 9 MIN -10 ** 9 -10 9 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = float("inf") INF float("inf") float "inf" IINF = 10 ** 18 IINF 10 ** 18 10 18 n,a,b,c,d = map(int, stdin.readline().rstrip().split()) n map(int, stdin.readline().rstrip().split()) map int stdin.readline().rstrip().split() stdin.readline().rstrip().split stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip split a b c d s = str(stdin.readline().rstrip()) s str(stdin.readline().rstrip()) str stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip if "##" in s[a-1:c] or "##" in s[b-1:d]:
    print("No")
else:
    if c < d:
        print("Yes")
    else:
        if "..." in s[b-2:d+1]:
            print("Yes")
        else:
            print("No") "##" in s[a-1:c] or "##" in s[b-1:d] "##" in s[a-1:c] "##" s[a-1:c] s a-1:c a-1 a 1 c "##" in s[b-1:d] "##" s[b-1:d] s b-1:d b-1 b 1 d print("No") print "No" if c < d:
        print("Yes")
    else:
        if "..." in s[b-2:d+1]:
            print("Yes")
        else:
            print("No") c < d c d print("Yes") print "Yes" if "..." in s[b-2:d+1]:
            print("Yes")
        else:
            print("No") "..." 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" print("No") print "No" a,b,c,d = map(int, stdin.readline().rstrip().split()) map(int, stdin.readline().rstrip().split()) a stdin = sys.stdin sys.stdin stdin IINF = 10 ** 18 10 ** 18 IINF s = str(stdin.readline().rstrip()) str(stdin.readline().rstrip()) s INF = float("inf") float("inf") INF MIN = -10 ** 9 -10 ** 9 MIN MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD n,a,b,c,d = map(int, stdin.readline().rstrip().split()) map(int, stdin.readline().rstrip().split()) n b,c,d = map(int, stdin.readline().rstrip().split()) map(int, stdin.readline().rstrip().split()) b c,d = map(int, stdin.readline().rstrip().split()) map(int, stdin.readline().rstrip().split()) c d = map(int, stdin.readline().rstrip().split()) map(int, stdin.readline().rstrip().split()) d
import sys
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

#n = int(stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
n,a,b,c,d = map(int, stdin.readline().rstrip().split())
#numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
#word = [stdin.readline().rstrip() for _ in range(n)]
#number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
#zeros = [[0] * w for i in range(h)]
s = str(stdin.readline().rstrip())

if "##" in s[a-1:c] or "##" in s[b-1:d]:
    print("No")
else:
    if c < d:
        print("Yes")
    else:
        if "..." in s[b-2:d+1]:
            print("Yes")
        else:
            print("No")
