n, a, b, c, d = map(lambda x: int(x)-1, input().split())
s = input()


def can_reach(x, y):
    return '##' not in s[x:y+1]


def can_jump(x, y):
    return '...' in s[x-1:y+2]


if can_reach(a, c) and can_reach(b, d):
    if c < d:
        print('Yes')
    else:
        if can_jump(b, d):
            print('Yes')
        else:
            print('No')
else:
    print('No') n, a, b, c, d = map(lambda x: int(x)-1, input().split()) n map(lambda x: int(x)-1, input().split()) map lambda x: int(x)-1 int(x)-1 int(x) int x 1 x input().split() ().split () input split a b c d s = input() s input() input def can_reach(x, y):
    return '##' not in s[x:y+1] can_reach return '##' not in s[x:y+1] '##' not in s[x:y+1] '##' s[x:y+1] s x:y+1 x y+1 y 1 x x y y def can_jump(x, y):
    return '...' in s[x-1:y+2] can_jump return '...' in s[x-1:y+2] '...' in s[x-1:y+2] '...' s[x-1:y+2] s x-1:y+2 x-1 x 1 y+2 y 2 x x y y if can_reach(a, c) and can_reach(b, d):
    if c < d:
        print('Yes')
    else:
        if can_jump(b, d):
            print('Yes')
        else:
            print('No')
else:
    print('No') can_reach(a, c) and can_reach(b, d) can_reach(a, c) can_reach a c can_reach(b, d) can_reach b d if c < d:
        print('Yes')
    else:
        if can_jump(b, d):
            print('Yes')
        else:
            print('No') c < d c d print('Yes') print 'Yes' if can_jump(b, d):
            print('Yes')
        else:
            print('No') can_jump(b, d) can_jump b d print('Yes') print 'Yes' print('No') print 'No' print('No') print 'No' b, c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) b d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) d n, a, b, c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) n def can_reach(x, y):
    return '##' not in s[x:y+1] def can_reach(x, y):
    return '##' not in s[x:y+1] can_reach def can_jump(x, y):
    return '...' in s[x-1:y+2] def can_jump(x, y):
    return '...' in s[x-1:y+2] can_jump c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) c a, b, c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) a s = input() input() s
n, a, b, c, d = map(lambda x: int(x)-1, input().split())
s = input()


def can_reach(x, y):
    return '##' not in s[x:y+1]


def can_jump(x, y):
    return '...' in s[x-1:y+2]


if can_reach(a, c) and can_reach(b, d):
    if c < d:
        print('Yes')
    else:
        if can_jump(b, d):
            print('Yes')
        else:
            print('No')
else:
    print('No')
