N ,A ,B ,C ,D = list(map(int,input().split()))
S = input()
 
def judgeArrive(S, x, y):
    flag = "Yes"
    for i in range(x-1 ,y-2):
        if S[i] ==  S[i+1] == "#":
            flag = "No"
    return flag

def judgeJumpOver(S, x , y):
    flag = "No"
    for i in range(x-1 ,y):
        if S[i-1] ==  S[i] ==  S[i+1] == ".":
            flag = "Yes"
            break
    return flag
 
result = "Yes"
if(C > D):
    result = judgeJumpOver(S, B, D)
if(result == "Yes"):
    result = judgeArrive(S, B, D)
if(result == "Yes"):
    result = judgeArrive(S, A, C)
print(result)