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

if "##" in S[A - 1: C] or "##" in S[B - 1: D]:
    print("No")
    exit(0)

if C <= D:
    print("Yes")
    exit(0)

ans = False
for i in range(B - 1, D):
    if (S[i - 1] == '.') and (S[i] == '.') and (S[i + 1] == '.'):
        ans = True
        break

if ans:
    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 if "##" in S[A - 1: C] or "##" in S[B - 1: D]:
    print("No")
    exit(0) "##" in S[A - 1: C] or "##" in S[B - 1: D] "##" in S[A - 1: C] "##" S[A - 1: C] S A - 1: C A - 1 A 1 C "##" in S[B - 1: D] "##" S[B - 1: D] S B - 1: D B - 1 B 1 D print("No") print "No" exit(0) exit 0 if C <= D:
    print("Yes")
    exit(0) C <= D C D print("Yes") print "Yes" exit(0) exit 0 ans = False ans False for i in range(B - 1, D):
    if (S[i - 1] == '.') and (S[i] == '.') and (S[i + 1] == '.'):
        ans = True
        break i range(B - 1, D) range B - 1 B 1 D if (S[i - 1] == '.') and (S[i] == '.') and (S[i + 1] == '.'):
        ans = True
        break (S[i - 1] == '.') and (S[i] == '.') and (S[i + 1] == '.') (S[i - 1] == '.') and (S[i] == '.') S[i - 1] == '.' S[i - 1] S i - 1 i 1 '.' S[i] == '.' S[i] S i '.' S[i + 1] == '.' S[i + 1] S i + 1 i 1 '.' ans = True ans True break if ans:
    print("Yes")
else:
    print("No") ans print("Yes") print "Yes" print("No") print "No" S = input() input() S ans = False False ans B, C, D = map(int, input().split()) map(int, input().split()) B A, B, C, D = map(int, input().split()) map(int, input().split()) A C, D = map(int, input().split()) map(int, input().split()) C D = map(int, input().split()) map(int, input().split()) D ans = True True ans 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()

if "##" in S[A - 1: C] or "##" in S[B - 1: D]:
    print("No")
    exit(0)

if C <= D:
    print("Yes")
    exit(0)

ans = False
for i in range(B - 1, D):
    if (S[i - 1] == '.') and (S[i] == '.') and (S[i + 1] == '.'):
        ans = True
        break

if ans:
    print("Yes")
else:
    print("No")
