n, a, b, c, d = map(int, input().split())
s = input()

s = '#' + s + '#'

def can_reach(start, end):
    for i in range(start, end+1):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True

if not can_reach(a, b) or not can_reach(b, d):
    print('No')
    exit()

if c > d:
    can_over = False
    for i in range(b, d+1):
        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            can_over = True
    if not can_over:
        print('No')
        exit()

print('Yes') 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 s = input() s input() input s = '#' + s + '#' s '#' + s + '#' '#' + s '#' s '#' def can_reach(start, end):
    for i in range(start, end+1):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True can_reach for i in range(start, end+1):
        if s[i] == '#' and s[i+1] == '#':
            return False
     i range(start, end+1) range start end+1 end 1 if s[i] == '#' and s[i+1] == '#':
            return False
     s[i] == '#' and s[i+1] == '#' s[i] == '#' s[i] s i '#' s[i+1] == '#' s[i+1] s i+1 i 1 '#' return False False return True True start start end end if not can_reach(a, b) or not can_reach(b, d):
    print('No')
    exit() not can_reach(a, b) or not can_reach(b, d) not can_reach(a, b) can_reach(a, b) can_reach a b not can_reach(b, d) can_reach(b, d) can_reach b d print('No') print 'No' exit() exit if c > d:
    can_over = False
    for i in range(b, d+1):
        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            can_over = True
    if not can_over:
        print('No')
        exit() c > d c d can_over = False can_over False for i in range(b, d+1):
        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            can_over = True
     i range(b, d+1) range b d+1 d 1 if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            can_over = 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_over = True can_over True if not can_over:
        print('No')
        exit() not can_over can_over print('No') print 'No' exit() exit print('Yes') print 'Yes' s = input() input() s can_over = False False can_over can_over = True True can_over n, a, b, c, d = map(int, input().split()) map(int, input().split()) n b, c, d = map(int, input().split()) map(int, input().split()) b d = map(int, input().split()) map(int, input().split()) d c, d = map(int, input().split()) map(int, input().split()) c def can_reach(start, end):
    for i in range(start, end+1):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True def can_reach(start, end):
    for i in range(start, end+1):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True can_reach a, b, c, d = map(int, input().split()) map(int, input().split()) a s = '#' + s + '#' '#' + s + '#' s
n, a, b, c, d = map(int, input().split())
s = input()

s = '#' + s + '#'

def can_reach(start, end):
    for i in range(start, end+1):
        if s[i] == '#' and s[i+1] == '#':
            return False
    return True

if not can_reach(a, b) or not can_reach(b, d):
    print('No')
    exit()

if c > d:
    can_over = False
    for i in range(b, d+1):
        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':
            can_over = True
    if not can_over:
        print('No')
        exit()

print('Yes')
