N, A, B, C, D = map(int, input().split())
S = input()
for i in range(A - 1, max(C, D) - 1):
    if S[i] == S[i + 1] == '#':
        print("No")
        exit()

if C < D:
    print("Yes")
else:
    for i in range(B - 2, D - 1):
        if S[i:i + 3] == '...':
            print("Yes")
            exit()
    print('No') 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 for i in range(A - 1, max(C, D) - 1):
    if S[i] == S[i + 1] == '#':
        print("No")
        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] == S[i + 1] == '#':
        print("No")
        exit() S[i] == S[i + 1] == '#' S[i] == S[i + 1] S[i] S i S[i + 1] S i + 1 i 1 '#' print("No") print "No" exit() exit if C < D:
    print("Yes")
else:
    for i in range(B - 2, D - 1):
        if S[i:i + 3] == '...':
            print("Yes")
            exit()
    print('No') C < D C D print("Yes") print "Yes" for i in range(B - 2, D - 1):
        if S[i:i + 3] == '...':
            print("Yes")
            exit()
     i range(B - 2, D - 1) range B - 2 B 2 D - 1 D 1 if S[i:i + 3] == '...':
            print("Yes")
            exit()
     S[i:i + 3] == '...' S[i:i + 3] S i:i + 3 i i + 3 i 3 '...' print("Yes") print "Yes" exit() exit print('No') print 'No' B, C, D = map(int, input().split()) map(int, input().split()) B S = input() input() S D = map(int, input().split()) map(int, input().split()) D C, D = map(int, input().split()) map(int, input().split()) C A, B, C, D = map(int, input().split()) map(int, input().split()) A N, A, B, C, D = map(int, input().split()) map(int, input().split()) N
N, A, B, C, D = map(int, input().split())
S = input()
for i in range(A - 1, max(C, D) - 1):
    if S[i] == S[i + 1] == '#':
        print("No")
        exit()

if C < D:
    print("Yes")
else:
    for i in range(B - 2, D - 1):
        if S[i:i + 3] == '...':
            print("Yes")
            exit()
    print('No')
