def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

n,a,b,c,d = iim()
s = input()
st = s[b-2:min(c,d)+1]
s = s[a-1:max(c,d)]

if '##' in s:
    print('No')
elif c < d:
    print('Yes')
else:
    print('Yes' if '...' in st else ' No') def ii():return int(input()) ii def iim():return map(int,input().split()) iim def iil():return list(map(int,input().split())) iil n,a,b,c,d = iim() n iim() iim a b c d s = input() s input() input st = s[b-2:min(c,d)+1] st s[b-2:min(c,d)+1] s b-2:min(c,d)+1 b-2 b 2 min(c,d)+1 min(c,d) min c d 1 s = s[a-1:max(c,d)] s s[a-1:max(c,d)] s a-1:max(c,d) a-1 a 1 max(c,d) max c d if '##' in s:
    print('No')
elif c < d:
    print('Yes')
else:
    print('Yes' if '...' in st else ' No') '##' in s '##' s print('No') print 'No' elif c < d:
    print('Yes') c < d c d print('Yes') print 'Yes' print('Yes' if '...' in st else ' No') print 'Yes' if '...' in st else ' No' '...' in st '...' st 'Yes' ' No' n,a,b,c,d = iim() iim() n s = input() input() s d = iim() iim() d def iil():return list(map(int,input().split())) def iil():return list(map(int,input().split())) iil s = s[a-1:max(c,d)] s[a-1:max(c,d)] s def iim():return map(int,input().split()) def iim():return map(int,input().split()) iim c,d = iim() iim() c b,c,d = iim() iim() b st = s[b-2:min(c,d)+1] s[b-2:min(c,d)+1] st def ii():return int(input()) def ii():return int(input()) ii a,b,c,d = iim() iim() a
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

n,a,b,c,d = iim()
s = input()
st = s[b-2:min(c,d)+1]
s = s[a-1:max(c,d)]

if '##' in s:
    print('No')
elif c < d:
    print('Yes')
else:
    print('Yes' if '...' in st else ' No')