def check(s):
    for i in range(len(s) - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True


def checksp(s):
    for i in range(len(s) - 2):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
    return False


N, A, B, C, D = map(int, input().split(" "))
S = input()
A -= 1; B -= 1; C -= 1; D -= 1;

if C < D:
    if check(S[A:C+1]) and check(S[B:D+1]):
        print('Yes')
    else:
        print('No')
else:
    if checksp(S[B-1:D+2]) and check(S[B:D+1]) and check(S[A:C+1]):
        print('Yes')
    else:
        print('No') def check(s):
    for i in range(len(s) - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True check for i in range(len(s) - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
     i range(len(s) - 1) range len(s) - 1 len(s) len s 1 if s[i] == '#' and s[i + 1] == '#':
            return False
     s[i] == '#' and s[i + 1] == '#' s[i] == '#' s[i] s i '#' s[i + 1] == '#' s[i + 1] s i + 1 i 1 '#' return False False return True True s s def checksp(s):
    for i in range(len(s) - 2):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
    return False checksp for i in range(len(s) - 2):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
     i range(len(s) - 2) range len(s) - 2 len(s) len s 2 if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
     s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.' s[i] == '.' and s[i + 1] == '.' s[i] == '.' s[i] s i '.' s[i + 1] == '.' s[i + 1] s i + 1 i 1 '.' s[i + 2] == '.' s[i + 2] s i + 2 i 2 '.' return True True return False False s s 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 A -= 1 A 1 B -= 1 B 1 C -= 1 C 1 D -= 1 D 1 if C < D:
    if check(S[A:C+1]) and check(S[B:D+1]):
        print('Yes')
    else:
        print('No')
else:
    if checksp(S[B-1:D+2]) and check(S[B:D+1]) and check(S[A:C+1]):
        print('Yes')
    else:
        print('No') C < D C D if check(S[A:C+1]) and check(S[B:D+1]):
        print('Yes')
    else:
        print('No') check(S[A:C+1]) and check(S[B:D+1]) check(S[A:C+1]) check S[A:C+1] S A:C+1 A C+1 C 1 check(S[B:D+1]) check S[B:D+1] S B:D+1 B D+1 D 1 print('Yes') print 'Yes' print('No') print 'No' if checksp(S[B-1:D+2]) and check(S[B:D+1]) and check(S[A:C+1]):
        print('Yes')
    else:
        print('No') checksp(S[B-1:D+2]) and check(S[B:D+1]) and check(S[A:C+1]) checksp(S[B-1:D+2]) and check(S[B:D+1]) checksp(S[B-1:D+2]) checksp S[B-1:D+2] S B-1:D+2 B-1 B 1 D+2 D 2 check(S[B:D+1]) check S[B:D+1] S B:D+1 B D+1 D 1 check(S[A:C+1]) check S[A:C+1] S A:C+1 A C+1 C 1 print('Yes') print 'Yes' print('No') print 'No' N, A, B, C, D = map(int, input().split(" ")) map(int, input().split(" ")) N B, C, D = map(int, input().split(" ")) map(int, input().split(" ")) B A -= 1 1 A def checksp(s):
    for i in range(len(s) - 2):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
    return False def checksp(s):
    for i in range(len(s) - 2):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
    return False checksp S = input() input() S B -= 1 1 B C -= 1 1 C def check(s):
    for i in range(len(s) - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True def check(s):
    for i in range(len(s) - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True check C, D = map(int, input().split(" ")) map(int, input().split(" ")) C A, B, C, D = map(int, input().split(" ")) map(int, input().split(" ")) A D = map(int, input().split(" ")) map(int, input().split(" ")) D D -= 1 1 D
def check(s):
    for i in range(len(s) - 1):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True


def checksp(s):
    for i in range(len(s) - 2):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            return True
    return False


N, A, B, C, D = map(int, input().split(" "))
S = input()
A -= 1; B -= 1; C -= 1; D -= 1;

if C < D:
    if check(S[A:C+1]) and check(S[B:D+1]):
        print('Yes')
    else:
        print('No')
else:
    if checksp(S[B-1:D+2]) and check(S[B:D+1]) and check(S[A:C+1]):
        print('Yes')
    else:
        print('No')