n,a_start,b_start,a_goal,b_goal = map(int,input().split())
s = input()
a_start -= 1
b_start -= 1
a_goal -= 1
b_goal -= 1

no_rock_double = True
for i in range(a_start, max(b_goal,a_goal)):
    if i+1 < n:
        if s[i] == '#' and s[i+1] == '#':
            no_rock_double = False
can_switch = False
if a_goal > b_goal:
    for i in range(b_start, b_goal+1):
        if i + 2 < n:
            if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
                can_switch = True
    if no_rock_double and can_switch:
        print('Yes')
    else:
        print('No')
else:
    if no_rock_double:
        print('Yes')
    else:
        print('No')
 n,a_start,b_start,a_goal,b_goal = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split a_start b_start a_goal b_goal s = input() s input() input a_start -= 1 a_start 1 b_start -= 1 b_start 1 a_goal -= 1 a_goal 1 b_goal -= 1 b_goal 1 no_rock_double = True no_rock_double True for i in range(a_start, max(b_goal,a_goal)):
    if i+1 < n:
        if s[i] == '#' and s[i+1] == '#':
            no_rock_double = False i range(a_start, max(b_goal,a_goal)) range a_start max(b_goal,a_goal) max b_goal a_goal if i+1 < n:
        if s[i] == '#' and s[i+1] == '#':
            no_rock_double = False i+1 < n i+1 i 1 n if s[i] == '#' and s[i+1] == '#':
            no_rock_double = False s[i] == '#' and s[i+1] == '#' s[i] == '#' s[i] s i '#' s[i+1] == '#' s[i+1] s i+1 i 1 '#' no_rock_double = False no_rock_double False can_switch = False can_switch False if a_goal > b_goal:
    for i in range(b_start, b_goal+1):
        if i + 2 < n:
            if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
                can_switch = True
    if no_rock_double and can_switch:
        print('Yes')
    else:
        print('No')
else:
    if no_rock_double:
        print('Yes')
    else:
        print('No') a_goal > b_goal a_goal b_goal for i in range(b_start, b_goal+1):
        if i + 2 < n:
            if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
                can_switch = True
     i range(b_start, b_goal+1) range b_start b_goal+1 b_goal 1 if i + 2 < n:
            if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
                can_switch = True
     i + 2 < n i + 2 i 2 n if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
                can_switch = True
     s[i-1] == '.' and s[i] == '.' and s[i+1] == '.' s[i-1] == '.' and s[i] == '.' s[i-1] == '.' s[i-1] s i-1 i 1 '.' s[i] == '.' s[i] s i '.' s[i+1] == '.' s[i+1] s i+1 i 1 '.' can_switch = True can_switch True if no_rock_double and can_switch:
        print('Yes')
    else:
        print('No') no_rock_double and can_switch no_rock_double can_switch print('Yes') print 'Yes' print('No') print 'No' if no_rock_double:
        print('Yes')
    else:
        print('No') no_rock_double print('Yes') print 'Yes' print('No') print 'No' b_goal = map(int,input().split()) map(int,input().split()) b_goal no_rock_double = False False no_rock_double b_goal -= 1 1 b_goal b_start,a_goal,b_goal = map(int,input().split()) map(int,input().split()) b_start no_rock_double = True True no_rock_double a_start -= 1 1 a_start b_start -= 1 1 b_start s = input() input() s n,a_start,b_start,a_goal,b_goal = map(int,input().split()) map(int,input().split()) n a_start,b_start,a_goal,b_goal = map(int,input().split()) map(int,input().split()) a_start a_goal -= 1 1 a_goal a_goal,b_goal = map(int,input().split()) map(int,input().split()) a_goal can_switch = False False can_switch can_switch = True True can_switch
n,a_start,b_start,a_goal,b_goal = map(int,input().split())
s = input()
a_start -= 1
b_start -= 1
a_goal -= 1
b_goal -= 1

no_rock_double = True
for i in range(a_start, max(b_goal,a_goal)):
    if i+1 < n:
        if s[i] == '#' and s[i+1] == '#':
            no_rock_double = False
can_switch = False
if a_goal > b_goal:
    for i in range(b_start, b_goal+1):
        if i + 2 < n:
            if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
                can_switch = True
    if no_rock_double and can_switch:
        print('Yes')
    else:
        print('No')
else:
    if no_rock_double:
        print('Yes')
    else:
        print('No')

