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


n, a, b, c, d = map(int, input().split())
s = list(input())
s = ['#'] + s + ['#']

# 岩が2個並ぶ
if not iwa_check(a, c) or not iwa_check(b, d):
    print('No')
    exit()

# 追い越す場合
if c > d:
    ok = False
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
    if not ok:
        print('No')
        exit()

# 追い越さない
print('Yes') def iwa_check(start, end):
    for i in range(start, end):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True iwa_check for i in range(start, end):
        if s[i] == '#' and s[i + 1] == '#':
            return False
     i range(start, end) range start end 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 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 = list(input()) s list(input()) list input() input s = ['#'] + s + ['#'] s ['#'] + s + ['#'] ['#'] + s ['#'] '#' s ['#'] '#' if not iwa_check(a, c) or not iwa_check(b, d):
    print('No')
    exit()

# 追い越す場合 not iwa_check(a, c) or not iwa_check(b, d) not iwa_check(a, c) iwa_check(a, c) iwa_check a c not iwa_check(b, d) iwa_check(b, d) iwa_check b d print('No') print 'No' exit() exit if c > d:
    ok = False
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
    if not ok:
        print('No')
        exit()

# 追い越さない c > d c d ok = False ok False for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
     i range(b, d + 1) range b d + 1 d 1 if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
     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 '.' ok = True ok True break if not ok:
        print('No')
        exit()

# 追い越さない not ok ok print('No') print 'No' exit() exit print('Yes') print 'Yes' n, a, b, c, d = map(int, input().split()) map(int, input().split()) n s = list(input()) list(input()) s ok = False False ok c, d = map(int, input().split()) map(int, input().split()) c b, c, d = map(int, input().split()) map(int, input().split()) b def iwa_check(start, end):
    for i in range(start, end):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True def iwa_check(start, end):
    for i in range(start, end):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True iwa_check d = map(int, input().split()) map(int, input().split()) d a, b, c, d = map(int, input().split()) map(int, input().split()) a ok = True True ok s = ['#'] + s + ['#'] ['#'] + s + ['#'] s
def iwa_check(start, end):
    for i in range(start, end):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True


n, a, b, c, d = map(int, input().split())
s = list(input())
s = ['#'] + s + ['#']

# 岩が2個並ぶ
if not iwa_check(a, c) or not iwa_check(b, d):
    print('No')
    exit()

# 追い越す場合
if c > d:
    ok = False
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
    if not ok:
        print('No')
        exit()

# 追い越さない
print('Yes')
