N, A, B, C, D = map(int, input().split())
S = input()


def move_snuke():
    global A, B
    if B == D:
        return False
    if S[B + 1] == '.' and A != B + 1:
        B += 1
        return True
    if S[B + 2] == '.' and A != B + 2:
        B += 2
        return True
    return False


def move_fnuke():
    global A, B
    if A == C:
        return False
    if S[A + 1] == '.' and B != A + 1:
        A += 1
        return True
    if S[A + 2] == '.' and B != A + 2:
        A += 2
        return True
    return False


S = '#' + S
while True:
    if C < D:
        if not move_snuke():
            if not move_fnuke():
                print('No')
                break
    else:
        if not move_fnuke():
            if not move_snuke():
                print('No')
                break
    if A == C and B == D:
        print('Yes')
        break 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 move_snuke():
    global A, B
    if B == D:
        return False
    if S[B + 1] == '.' and A != B + 1:
        B += 1
        return True
    if S[B + 2] == '.' and A != B + 2:
        B += 2
        return True
    return False move_snuke global A, B if B == D:
        return False
     B == D B D return False False if S[B + 1] == '.' and A != B + 1:
        B += 1
        return True
     S[B + 1] == '.' and A != B + 1 S[B + 1] == '.' S[B + 1] S B + 1 B 1 '.' A != B + 1 A B + 1 B 1 B += 1 B 1 return True True if S[B + 2] == '.' and A != B + 2:
        B += 2
        return True
     S[B + 2] == '.' and A != B + 2 S[B + 2] == '.' S[B + 2] S B + 2 B 2 '.' A != B + 2 A B + 2 B 2 B += 2 B 2 return True True return False False def move_fnuke():
    global A, B
    if A == C:
        return False
    if S[A + 1] == '.' and B != A + 1:
        A += 1
        return True
    if S[A + 2] == '.' and B != A + 2:
        A += 2
        return True
    return False move_fnuke global A, B if A == C:
        return False
     A == C A C return False False if S[A + 1] == '.' and B != A + 1:
        A += 1
        return True
     S[A + 1] == '.' and B != A + 1 S[A + 1] == '.' S[A + 1] S A + 1 A 1 '.' B != A + 1 B A + 1 A 1 A += 1 A 1 return True True if S[A + 2] == '.' and B != A + 2:
        A += 2
        return True
     S[A + 2] == '.' and B != A + 2 S[A + 2] == '.' S[A + 2] S A + 2 A 2 '.' B != A + 2 B A + 2 A 2 A += 2 A 2 return True True return False False S = '#' + S S '#' + S '#' S while True:
    if C < D:
        if not move_snuke():
            if not move_fnuke():
                print('No')
                break
    else:
        if not move_fnuke():
            if not move_snuke():
                print('No')
                break
    if A == C and B == D:
        print('Yes')
        break True if C < D:
        if not move_snuke():
            if not move_fnuke():
                print('No')
                break
    else:
        if not move_fnuke():
            if not move_snuke():
                print('No')
                break
     C < D C D if not move_snuke():
            if not move_fnuke():
                print('No')
                break
     not move_snuke() move_snuke() move_snuke if not move_fnuke():
                print('No')
                break
     not move_fnuke() move_fnuke() move_fnuke print('No') print 'No' break if not move_fnuke():
            if not move_snuke():
                print('No')
                break
     not move_fnuke() move_fnuke() move_fnuke if not move_snuke():
                print('No')
                break
     not move_snuke() move_snuke() move_snuke print('No') print 'No' break if A == C and B == D:
        print('Yes')
        break A == C and B == D A == C A C B == D B D print('Yes') print 'Yes' break D = map(int, input().split()) map(int, input().split()) D N, A, B, C, D = map(int, input().split()) map(int, input().split()) N S = input() input() S B, C, D = map(int, input().split()) map(int, input().split()) B def move_fnuke():
    global A, B
    if A == C:
        return False
    if S[A + 1] == '.' and B != A + 1:
        A += 1
        return True
    if S[A + 2] == '.' and B != A + 2:
        A += 2
        return True
    return False def move_fnuke():
    global A, B
    if A == C:
        return False
    if S[A + 1] == '.' and B != A + 1:
        A += 1
        return True
    if S[A + 2] == '.' and B != A + 2:
        A += 2
        return True
    return False move_fnuke def move_snuke():
    global A, B
    if B == D:
        return False
    if S[B + 1] == '.' and A != B + 1:
        B += 1
        return True
    if S[B + 2] == '.' and A != B + 2:
        B += 2
        return True
    return False def move_snuke():
    global A, B
    if B == D:
        return False
    if S[B + 1] == '.' and A != B + 1:
        B += 1
        return True
    if S[B + 2] == '.' and A != B + 2:
        B += 2
        return True
    return False move_snuke A, B, C, D = map(int, input().split()) map(int, input().split()) A C, D = map(int, input().split()) map(int, input().split()) C S = '#' + S '#' + S S
N, A, B, C, D = map(int, input().split())
S = input()


def move_snuke():
    global A, B
    if B == D:
        return False
    if S[B + 1] == '.' and A != B + 1:
        B += 1
        return True
    if S[B + 2] == '.' and A != B + 2:
        B += 2
        return True
    return False


def move_fnuke():
    global A, B
    if A == C:
        return False
    if S[A + 1] == '.' and B != A + 1:
        A += 1
        return True
    if S[A + 2] == '.' and B != A + 2:
        A += 2
        return True
    return False


S = '#' + S
while True:
    if C < D:
        if not move_snuke():
            if not move_fnuke():
                print('No')
                break
    else:
        if not move_fnuke():
            if not move_snuke():
                print('No')
                break
    if A == C and B == D:
        print('Yes')
        break
