import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, a, b, c, d = LI()
a, b, c, d = a - 1, b - 1, c - 1, d - 1
s = S()

# 連続した岩がないか
for i in range(a + 1, max(c, d) - 1):
    if s[i:i + 2] == '##':
        print('No')
        sys.exit()

if c < d:
    print('Yes')
    sys.exit()

else:
    # どこかで a が b を追い越す必要がある
    # b がどこに居ても追い越せるための 3マス連続の空きマスがあるか
    for i in range(b, d + 1):
        if s[i - 1:i + 2] == '...':
            print('Yes')
            sys.exit()
    print('No') import sys sys def input(): return sys.stdin.readline().strip() input def I(): return int(input()) I def LI(): return list(map(int, input().split())) LI I() for i in range(n) for i in range(n) i range(n) range n for i in range(n) I() I def IR(n): return [I() for i in range(n)] IR n n LI() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LI() LI def LIR(n): return [LI() for i in range(n)] LIR n n S() for i in range(n) for i in range(n) i range(n) range n for i in range(n) S() S def SR(n): return [S() for i in range(n)] SR n n def S(): return input() S def LS(): return input().split() LS INF = float('inf') INF float('inf') float 'inf' n, a, b, c, d = LI() n LI() LI a b c d a, b, c, d = a - 1, b - 1, c - 1, d - 1 a a - 1 a 1 b b - 1 b 1 c c - 1 c 1 d d - 1 d 1 s = S() s S() S for i in range(a + 1, max(c, d) - 1):
    if s[i:i + 2] == '##':
        print('No')
        sys.exit() i range(a + 1, max(c, d) - 1) range a + 1 a 1 max(c, d) - 1 max(c, d) max c d 1 if s[i:i + 2] == '##':
        print('No')
        sys.exit() s[i:i + 2] == '##' s[i:i + 2] s i:i + 2 i i + 2 i 2 '##' print('No') print 'No' sys.exit() sys.exit sys exit if c < d:
    print('Yes')
    sys.exit()

else:
    # どこかで a が b を追い越す必要がある
    # b がどこに居ても追い越せるための 3マス連続の空きマスがあるか
    for i in range(b, d + 1):
        if s[i - 1:i + 2] == '...':
            print('Yes')
            sys.exit()
    print('No') c < d c d print('Yes') print 'Yes' sys.exit() sys.exit sys exit for i in range(b, d + 1):
        if s[i - 1:i + 2] == '...':
            print('Yes')
            sys.exit()
     i range(b, d + 1) range b d + 1 d 1 if s[i - 1:i + 2] == '...':
            print('Yes')
            sys.exit()
     s[i - 1:i + 2] == '...' s[i - 1:i + 2] s i - 1:i + 2 i - 1 i 1 i + 2 i 2 '...' print('Yes') print 'Yes' sys.exit() sys.exit sys exit print('No') print 'No' a, b, c, d = a - 1, b - 1, c - 1, d - 1 a - 1 a INF = float('inf') float('inf') INF s = S() S() s n, a, b, c, d = LI() LI() n d = LI() LI() d def IR(n): return [I() for i in range(n)] def IR(n): return [I() for i in range(n)] IR def SR(n): return [S() for i in range(n)] def SR(n): return [S() for i in range(n)] SR def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input def LS(): return input().split() def LS(): return input().split() LS b, c, d = a - 1, b - 1, c - 1, d - 1 b - 1 b def LIR(n): return [LI() for i in range(n)] def LIR(n): return [LI() for i in range(n)] LIR b, c, d = LI() LI() b a, b, c, d = LI() LI() a c, d = LI() LI() c c, d = a - 1, b - 1, c - 1, d - 1 c - 1 c d = a - 1, b - 1, c - 1, d - 1 d - 1 d def I(): return int(input()) def I(): return int(input()) I def S(): return input() def S(): return input() S
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, a, b, c, d = LI()
a, b, c, d = a - 1, b - 1, c - 1, d - 1
s = S()

# 連続した岩がないか
for i in range(a + 1, max(c, d) - 1):
    if s[i:i + 2] == '##':
        print('No')
        sys.exit()

if c < d:
    print('Yes')
    sys.exit()

else:
    # どこかで a が b を追い越す必要がある
    # b がどこに居ても追い越せるための 3マス連続の空きマスがあるか
    for i in range(b, d + 1):
        if s[i - 1:i + 2] == '...':
            print('Yes')
            sys.exit()
    print('No')
