#!/usr/bin/env python3

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

#hunuke

h = S[A-1:D+1].count('##')
m3 = S[B-2:D+1].count('...')

if C < D:
    if h == 0: print('Yes')
    else: print('No')
else:
    if m3 != 0 and h == 0:
        print('Yes')
    else: 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 h = S[A-1:D+1].count('##') h S[A-1:D+1].count('##') [A-1:D+1].count [A-1:D+1] S A-1:D+1 A-1 A 1 D+1 D 1 count '##' m3 = S[B-2:D+1].count('...') m3 S[B-2:D+1].count('...') [B-2:D+1].count [B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 count '...' if C < D:
    if h == 0: print('Yes')
    else: print('No')
else:
    if m3 != 0 and h == 0:
        print('Yes')
    else: print('No')
     C < D C D if h == 0: print('Yes')
    else: print('No') h == 0 h 0 if m3 != 0 and h == 0:
        print('Yes')
    else: print('No')
     m3 != 0 and h == 0 m3 != 0 m3 0 h == 0 h 0 print('Yes') print 'Yes' h = S[A-1:D+1].count('##') S[A-1:D+1].count('##') h A, B, C, D = map(int, input().split()) map(int, input().split()) A B, C, D = map(int, input().split()) map(int, input().split()) B C, D = map(int, input().split()) map(int, input().split()) C 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 m3 = S[B-2:D+1].count('...') S[B-2:D+1].count('...') m3
#!/usr/bin/env python3

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

#hunuke

h = S[A-1:D+1].count('##')
m3 = S[B-2:D+1].count('...')

if C < D:
    if h == 0: print('Yes')
    else: print('No')
else:
    if m3 != 0 and h == 0:
        print('Yes')
    else: print('No')
    
