#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = int(input())
n, a, b, c, d  = map(int, input().split())
a -= 1
b -= 1
c -= 1
d -= 1
s  = input()
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

is_rock2 = '##' in s[a:d+1]
is_empty3 = '...' in s[b-1:d+2]

joken = (not is_rock2) and (is_empty3 if c > d else 1)
print('Yes' if joken else 'No') import collections collections import itertools as it itertools import math math n, a, b, c, d  = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split a b c d a -= 1 a 1 b -= 1 b 1 c -= 1 c 1 d -= 1 d 1 s  = input() s input() input is_rock2 = '##' in s[a:d+1] is_rock2 '##' in s[a:d+1] '##' s[a:d+1] s a:d+1 a d+1 d 1 is_empty3 = '...' in s[b-1:d+2] is_empty3 '...' in s[b-1:d+2] '...' s[b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 joken = (not is_rock2) and (is_empty3 if c > d else 1) joken (not is_rock2) and (is_empty3 if c > d else 1) not is_rock2 is_rock2 is_empty3 if c > d else 1 c > d c d is_empty3 1 print('Yes' if joken else 'No') print 'Yes' if joken else 'No' joken 'Yes' 'No' b -= 1 1 b d  = map(int, input().split()) map(int, input().split()) d s  = input() input() s n, a, b, c, d  = map(int, input().split()) map(int, input().split()) n a, b, c, d  = map(int, input().split()) map(int, input().split()) a c, d  = map(int, input().split()) map(int, input().split()) c d -= 1 1 d is_rock2 = '##' in s[a:d+1] '##' in s[a:d+1] is_rock2 is_empty3 = '...' in s[b-1:d+2] '...' in s[b-1:d+2] is_empty3 c -= 1 1 c b, c, d  = map(int, input().split()) map(int, input().split()) b joken = (not is_rock2) and (is_empty3 if c > d else 1) (not is_rock2) and (is_empty3 if c > d else 1) joken a -= 1 1 a
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = int(input())
n, a, b, c, d  = map(int, input().split())
a -= 1
b -= 1
c -= 1
d -= 1
s  = input()
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

is_rock2 = '##' in s[a:d+1]
is_empty3 = '...' in s[b-1:d+2]

joken = (not is_rock2) and (is_empty3 if c > d else 1)
print('Yes' if joken else 'No')
