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

if s[c] == '#' or s[d] == '#':
    print('No')
    exit()

# '##'を検知
if '##' in s[a:c+1] or '##' in s[b:d+1]:
    print('No')
    exit()

if c > d:
    # 3 マス以上の連続する'.'が必要
    num_dot = s[b-1:d+2].count("...")
    if num_dot == 0:
        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() input if s[c] == '#' or s[d] == '#':
    print('No')
    exit()

# '##'を検知 s[c] == '#' or s[d] == '#' s[c] == '#' s[c] s c '#' s[d] == '#' s[d] s d '#' print('No') print 'No' exit() exit if '##' in s[a:c+1] or '##' in s[b:d+1]:
    print('No')
    exit() '##' in s[a:c+1] or '##' in s[b:d+1] '##' in s[a:c+1] '##' s[a:c+1] s a:c+1 a c+1 c 1 '##' in s[b:d+1] '##' s[b:d+1] s b:d+1 b d+1 d 1 print('No') print 'No' exit() exit if c > d:
    # 3 マス以上の連続する'.'が必要
    num_dot = s[b-1:d+2].count("...")
    if num_dot == 0:
        print('No')
        exit() c > d c d num_dot = s[b-1:d+2].count("...") num_dot s[b-1:d+2].count("...") [b-1:d+2].count [b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 count "..." if num_dot == 0:
        print('No')
        exit() num_dot == 0 num_dot 0 print('No') print 'No' exit() exit print('Yes') print 'Yes' c, d = map(int, input().split()) map(int, input().split()) c s = '_' + input() '_' + input() s n, a, b, c, d = map(int, input().split()) map(int, input().split()) n num_dot = s[b-1:d+2].count("...") s[b-1:d+2].count("...") num_dot d = map(int, input().split()) map(int, input().split()) d b, c, d = map(int, input().split()) map(int, input().split()) b a, b, c, d = map(int, input().split()) map(int, input().split()) a
n, a, b, c, d = map(int, input().split())
s = '_' + input()

if s[c] == '#' or s[d] == '#':
    print('No')
    exit()

# '##'を検知
if '##' in s[a:c+1] or '##' in s[b:d+1]:
    print('No')
    exit()

if c > d:
    # 3 マス以上の連続する'.'が必要
    num_dot = s[b-1:d+2].count("...")
    if num_dot == 0:
        print('No')
        exit()

print('Yes')