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

def check_twice(left, right, l):
    for i in range(left-1, right):
        if l[i] == '#' and l[i+1] == '#':
            return False
    return True

def check_triple(left, right, l):
    f = False
    for i in range(left-1, right-2):
        if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
    return f

if c < d:
    flg = check_twice(a, c, s) & check_twice(b, d, s)
    if flg is True:
        print('Yes')
    else:
        print('No')

else:
    flg = check_twice(a, c, s) & check_triple(b-1, d+1, s)
    if flg is True:
        print('Yes')
    else:
        print('No') 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 def check_twice(left, right, l):
    for i in range(left-1, right):
        if l[i] == '#' and l[i+1] == '#':
            return False
    return True check_twice for i in range(left-1, right):
        if l[i] == '#' and l[i+1] == '#':
            return False
     i range(left-1, right) range left-1 left 1 right if l[i] == '#' and l[i+1] == '#':
            return False
     l[i] == '#' and l[i+1] == '#' l[i] == '#' l[i] l i '#' l[i+1] == '#' l[i+1] l i+1 i 1 '#' return False False return True True left left right right l l def check_triple(left, right, l):
    f = False
    for i in range(left-1, right-2):
        if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
    return f check_triple f = False f False for i in range(left-1, right-2):
        if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
     i range(left-1, right-2) range left-1 left 1 right-2 right 2 if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
     l[i] == '.' and l[i+1] == '.' and l[i+2] == '.' l[i] == '.' and l[i+1] == '.' l[i] == '.' l[i] l i '.' l[i+1] == '.' l[i+1] l i+1 i 1 '.' l[i+2] == '.' l[i+2] l i+2 i 2 '.' f = True f True break continue return f f left left right right l l if c < d:
    flg = check_twice(a, c, s) & check_twice(b, d, s)
    if flg is True:
        print('Yes')
    else:
        print('No')

else:
    flg = check_twice(a, c, s) & check_triple(b-1, d+1, s)
    if flg is True:
        print('Yes')
    else:
        print('No') c < d c d flg = check_twice(a, c, s) & check_twice(b, d, s) flg check_twice(a, c, s) & check_twice(b, d, s) check_twice(a, c, s) check_twice a c s check_twice(b, d, s) check_twice b d s if flg is True:
        print('Yes')
    else:
        print('No') flg is True flg True print('Yes') print 'Yes' print('No') print 'No' flg = check_twice(a, c, s) & check_triple(b-1, d+1, s) flg check_twice(a, c, s) & check_triple(b-1, d+1, s) check_twice(a, c, s) check_twice a c s check_triple(b-1, d+1, s) check_triple b-1 b 1 d+1 d 1 s if flg is True:
        print('Yes')
    else:
        print('No') flg is True flg True print('Yes') print 'Yes' print('No') print 'No' c,d = map(int, input().split()) map(int, input().split()) c def check_triple(left, right, l):
    f = False
    for i in range(left-1, right-2):
        if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
    return f def check_triple(left, right, l):
    f = False
    for i in range(left-1, right-2):
        if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
    return f check_triple s = input() input() s b,c,d = map(int, input().split()) map(int, input().split()) b d = map(int, input().split()) map(int, input().split()) d flg = check_twice(a, c, s) & check_twice(b, d, s) check_twice(a, c, s) & check_twice(b, d, s) flg n, a,b,c,d = map(int, input().split()) map(int, input().split()) n def check_twice(left, right, l):
    for i in range(left-1, right):
        if l[i] == '#' and l[i+1] == '#':
            return False
    return True def check_twice(left, right, l):
    for i in range(left-1, right):
        if l[i] == '#' and l[i+1] == '#':
            return False
    return True check_twice flg = check_twice(a, c, s) & check_triple(b-1, d+1, s) check_twice(a, c, s) & check_triple(b-1, d+1, s) flg a,b,c,d = map(int, input().split()) map(int, input().split()) a
n, a,b,c,d = map(int, input().split())
s = input()

def check_twice(left, right, l):
    for i in range(left-1, right):
        if l[i] == '#' and l[i+1] == '#':
            return False
    return True

def check_triple(left, right, l):
    f = False
    for i in range(left-1, right-2):
        if l[i] == '.' and l[i+1] == '.' and l[i+2] == '.':
            f = True
            break
        else:
            continue
    return f

if c < d:
    flg = check_twice(a, c, s) & check_twice(b, d, s)
    if flg is True:
        print('Yes')
    else:
        print('No')

else:
    flg = check_twice(a, c, s) & check_triple(b-1, d+1, s)
    if flg is True:
        print('Yes')
    else:
        print('No')
