n, a, b, c, d = map(lambda x:int(x)-1,input().split())
n += 1
S = input()

ok = True
overtake = False

if c < d:
    overtake = True
    
for i in range(a,d):
    if S[i] == "#" and S[i+1] == "#":
        ok = False

for i in range(b,min(d+1,n-1)):
    if S[i] == "." and S[i-1] == "." and S[i+1] == ".":
        overtake = True
        
if ok and overtake:
    print('Yes')
else:
    print('No') n, a, b, c, d = map(lambda x:int(x)-1,input().split()) n map(lambda x:int(x)-1,input().split()) map lambda x:int(x)-1 int(x)-1 int(x) int x 1 x input().split() ().split () input split a b c d n += 1 n 1 S = input() S input() input ok = True ok True overtake = False overtake False if c < d:
    overtake = True
     c < d c d overtake = True overtake True for i in range(a,d):
    if S[i] == "#" and S[i+1] == "#":
        ok = False i range(a,d) range a d if S[i] == "#" and S[i+1] == "#":
        ok = False S[i] == "#" and S[i+1] == "#" S[i] == "#" S[i] S i "#" S[i+1] == "#" S[i+1] S i+1 i 1 "#" ok = False ok False for i in range(b,min(d+1,n-1)):
    if S[i] == "." and S[i-1] == "." and S[i+1] == ".":
        overtake = True
         i range(b,min(d+1,n-1)) range b min(d+1,n-1) min d+1 d 1 n-1 n 1 if S[i] == "." and S[i-1] == "." and S[i+1] == ".":
        overtake = True
         S[i] == "." and S[i-1] == "." and S[i+1] == "." S[i] == "." and S[i-1] == "." S[i] == "." S[i] S i "." S[i-1] == "." S[i-1] S i-1 i 1 "." S[i+1] == "." S[i+1] S i+1 i 1 "." overtake = True overtake True if ok and overtake:
    print('Yes')
else:
    print('No') ok and overtake ok overtake print('Yes') print 'Yes' print('No') print 'No' n += 1 1 n d = map(lambda x:int(x)-1,input().split()) map(lambda x:int(x)-1,input().split()) d ok = False False ok b, c, d = map(lambda x:int(x)-1,input().split()) map(lambda x:int(x)-1,input().split()) b S = input() input() S c, d = map(lambda x:int(x)-1,input().split()) map(lambda x:int(x)-1,input().split()) c overtake = False False overtake overtake = True True overtake overtake = True True overtake a, b, c, d = map(lambda x:int(x)-1,input().split()) map(lambda x:int(x)-1,input().split()) a n, a, b, c, d = map(lambda x:int(x)-1,input().split()) map(lambda x:int(x)-1,input().split()) n ok = True True ok
n, a, b, c, d = map(lambda x:int(x)-1,input().split())
n += 1
S = input()

ok = True
overtake = False

if c < d:
    overtake = True
    
for i in range(a,d):
    if S[i] == "#" and S[i+1] == "#":
        ok = False

for i in range(b,min(d+1,n-1)):
    if S[i] == "." and S[i-1] == "." and S[i+1] == ".":
        overtake = True
        
if ok and overtake:
    print('Yes')
else:
    print('No')