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


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

# a~c,b~d間で岩2連続は無理
if not check(a, c) or not check(b, d):
    print('No')
    exit()

# d<cなら飛び越え必要=b~d区間に3マス連続空きが必要
if d < c:
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            print('Yes')
            exit()
    print('No')
else:
    print('Yes') def check(start, end):
    for i in range(start, end - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True check 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 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 '#' if not check(a, c) or not check(b, d):
    print('No')
    exit()

# d<cなら飛び越え必要=b~d区間に3マス連続空きが必要 not check(a, c) or not check(b, d) not check(a, c) check(a, c) check a c not check(b, d) check(b, d) check b d print('No') print 'No' exit() exit if d < c:
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            print('Yes')
            exit()
    print('No')
else:
    print('Yes') d < c d c for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            print('Yes')
            exit()
     i range(b, d + 1) range b d + 1 d 1 if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            print('Yes')
            exit()
     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 '.' print('Yes') print 'Yes' exit() exit print('No') print 'No' print('Yes') print 'Yes' b, c, d = map(int, input().split()) map(int, input().split()) b def check(start, end):
    for i in range(start, end - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True def check(start, end):
    for i in range(start, end - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True check d = map(int, input().split()) map(int, input().split()) d c, d = map(int, input().split()) map(int, input().split()) c n, a, b, c, d = map(int, input().split()) map(int, input().split()) n s = input() input() s s = '#' + s + '#' '#' + s + '#' s a, b, c, d = map(int, input().split()) map(int, input().split()) a
def check(start, end):
    for i in range(start, end - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True


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

# a~c,b~d間で岩2連続は無理
if not check(a, c) or not check(b, d):
    print('No')
    exit()

# d<cなら飛び越え必要=b~d区間に3マス連続空きが必要
if d < c:
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            print('Yes')
            exit()
    print('No')
else:
    print('Yes')
