import sys
N, A, B, C, D = list(map(int, input().split()))
S = input()
A -= 1
B -= 1
C -= 1
D -= 1
if C < D:
    i = A
    while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    i = B
    while i < D:
        while i < D and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < D and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    print('Yes')
else:
    i = B - 1
    cnt_s = 0
    while i <= D + 1:
        _cnt_s = 0
        while i <= D + 1 and S[i] == '.':
            i += 1
            _cnt_s += 1
        cnt_s = max(cnt_s, _cnt_s)
        _cnt_r = 0
        while i <= D + 1 and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    if cnt_s <= 2:
        print('No')
        sys.exit()
    i = A
    while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    print('Yes') import sys sys N, A, B, C, D = list(map(int, input().split())) N list(map(int, input().split())) list 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:
    i = A
    while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    i = B
    while i < D:
        while i < D and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < D and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    print('Yes')
else:
    i = B - 1
    cnt_s = 0
    while i <= D + 1:
        _cnt_s = 0
        while i <= D + 1 and S[i] == '.':
            i += 1
            _cnt_s += 1
        cnt_s = max(cnt_s, _cnt_s)
        _cnt_r = 0
        while i <= D + 1 and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    if cnt_s <= 2:
        print('No')
        sys.exit()
    i = A
    while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    print('Yes') C < D C D i = A i A while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
     i < C i C while i < C and S[i] == '.':
            i += 1
         i < C and S[i] == '.' i < C i C S[i] == '.' S[i] S i '.' i += 1 i 1 _cnt_r = 0 _cnt_r 0 while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
         i < C and S[i] == '#' i < C i C S[i] == '#' S[i] S i '#' i += 1 i 1 _cnt_r += 1 _cnt_r 1 if _cnt_r >= 2:
            print('No')
            sys.exit()
     _cnt_r >= 2 _cnt_r 2 print('No') print 'No' sys.exit() sys.exit sys exit i = B i B while i < D:
        while i < D and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < D and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
     i < D i D while i < D and S[i] == '.':
            i += 1
         i < D and S[i] == '.' i < D i D S[i] == '.' S[i] S i '.' i += 1 i 1 _cnt_r = 0 _cnt_r 0 while i < D and S[i] == '#':
            i += 1
            _cnt_r += 1
         i < D and S[i] == '#' i < D i D S[i] == '#' S[i] S i '#' i += 1 i 1 _cnt_r += 1 _cnt_r 1 if _cnt_r >= 2:
            print('No')
            sys.exit()
     _cnt_r >= 2 _cnt_r 2 print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' i = B - 1 i B - 1 B 1 cnt_s = 0 cnt_s 0 while i <= D + 1:
        _cnt_s = 0
        while i <= D + 1 and S[i] == '.':
            i += 1
            _cnt_s += 1
        cnt_s = max(cnt_s, _cnt_s)
        _cnt_r = 0
        while i <= D + 1 and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
     i <= D + 1 i D + 1 D 1 _cnt_s = 0 _cnt_s 0 while i <= D + 1 and S[i] == '.':
            i += 1
            _cnt_s += 1
         i <= D + 1 and S[i] == '.' i <= D + 1 i D + 1 D 1 S[i] == '.' S[i] S i '.' i += 1 i 1 _cnt_s += 1 _cnt_s 1 cnt_s = max(cnt_s, _cnt_s) cnt_s max(cnt_s, _cnt_s) max cnt_s _cnt_s _cnt_r = 0 _cnt_r 0 while i <= D + 1 and S[i] == '#':
            i += 1
            _cnt_r += 1
         i <= D + 1 and S[i] == '#' i <= D + 1 i D + 1 D 1 S[i] == '#' S[i] S i '#' i += 1 i 1 _cnt_r += 1 _cnt_r 1 if _cnt_r >= 2:
            print('No')
            sys.exit()
     _cnt_r >= 2 _cnt_r 2 print('No') print 'No' sys.exit() sys.exit sys exit if cnt_s <= 2:
        print('No')
        sys.exit()
     cnt_s <= 2 cnt_s 2 print('No') print 'No' sys.exit() sys.exit sys exit i = A i A while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
     i < C i C while i < C and S[i] == '.':
            i += 1
         i < C and S[i] == '.' i < C i C S[i] == '.' S[i] S i '.' i += 1 i 1 _cnt_r = 0 _cnt_r 0 while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
         i < C and S[i] == '#' i < C i C S[i] == '#' S[i] S i '#' i += 1 i 1 _cnt_r += 1 _cnt_r 1 if _cnt_r >= 2:
            print('No')
            sys.exit()
     _cnt_r >= 2 _cnt_r 2 print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' i += 1 1 i _cnt_r = 0 0 _cnt_r cnt_s = 0 0 cnt_s B, C, D = list(map(int, input().split())) list(map(int, input().split())) B i = B - 1 B - 1 i C, D = list(map(int, input().split())) list(map(int, input().split())) C S = input() input() S i += 1 1 i i += 1 1 i i += 1 1 i cnt_s = max(cnt_s, _cnt_s) max(cnt_s, _cnt_s) cnt_s i += 1 1 i _cnt_r += 1 1 _cnt_r i += 1 1 i _cnt_r += 1 1 _cnt_r _cnt_r += 1 1 _cnt_r _cnt_s = 0 0 _cnt_s i += 1 1 i i = B B i N, A, B, C, D = list(map(int, input().split())) list(map(int, input().split())) N A -= 1 1 A i += 1 1 i i = A A i A, B, C, D = list(map(int, input().split())) list(map(int, input().split())) A _cnt_r = 0 0 _cnt_r D -= 1 1 D i = A A i C -= 1 1 C _cnt_r = 0 0 _cnt_r B -= 1 1 B D = list(map(int, input().split())) list(map(int, input().split())) D _cnt_s += 1 1 _cnt_s _cnt_r = 0 0 _cnt_r _cnt_r += 1 1 _cnt_r
import sys
N, A, B, C, D = list(map(int, input().split()))
S = input()
A -= 1
B -= 1
C -= 1
D -= 1
if C < D:
    i = A
    while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    i = B
    while i < D:
        while i < D and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < D and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    print('Yes')
else:
    i = B - 1
    cnt_s = 0
    while i <= D + 1:
        _cnt_s = 0
        while i <= D + 1 and S[i] == '.':
            i += 1
            _cnt_s += 1
        cnt_s = max(cnt_s, _cnt_s)
        _cnt_r = 0
        while i <= D + 1 and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    if cnt_s <= 2:
        print('No')
        sys.exit()
    i = A
    while i < C:
        while i < C and S[i] == '.':
            i += 1
        _cnt_r = 0
        while i < C and S[i] == '#':
            i += 1
            _cnt_r += 1
        if _cnt_r >= 2:
            print('No')
            sys.exit()
    print('Yes')
