import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

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

if C < D:#抜かさなくて良い
    if "##" not in S[A-1:D]:
        print("Yes")
    else:
        print("No")
else:#抜かす必要がある
    if "..." in S[B-2:D+1] and "##" not in S[A-1:C]:
        print("Yes")
    else:
        print("No")
 import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10**8) sys.setrecursionlimit sys setrecursionlimit 10**8 10 8 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 INF = 10**18 INF 10**18 10 18 eps = 10**-7 eps 10**-7 10 -7 N,A,B,C,D = map(int,readline().split()) N map(int,readline().split()) map int readline().split() ().split () readline split A B C D S = readline().rstrip() S readline().rstrip() ().rstrip () readline rstrip if C < D:#抜かさなくて良い
    if "##" not in S[A-1:D]:
        print("Yes")
    else:
        print("No")
else:#抜かす必要がある
    if "..." in S[B-2:D+1] and "##" not in S[A-1:C]:
        print("Yes")
    else:
        print("No") C < D C D if "##" not in S[A-1:D]:
        print("Yes")
    else:
        print("No") "##" not in S[A-1:D] "##" S[A-1:D] S A-1:D A-1 A 1 D print("Yes") print "Yes" print("No") print "No" if "..." in S[B-2:D+1] and "##" not in S[A-1:C]:
        print("Yes")
    else:
        print("No") "..." in S[B-2:D+1] and "##" not in S[A-1:C] "..." in S[B-2:D+1] "..." S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 "##" not in S[A-1:C] "##" S[A-1:C] S A-1:C A-1 A 1 C print("Yes") print "Yes" print("No") print "No" INF = 10**18 10**18 INF readline = sys.stdin.readline sys.stdin.readline readline mod = 10**9+7 10**9+7 mod D = map(int,readline().split()) map(int,readline().split()) D N,A,B,C,D = map(int,readline().split()) map(int,readline().split()) N A,B,C,D = map(int,readline().split()) map(int,readline().split()) A B,C,D = map(int,readline().split()) map(int,readline().split()) B eps = 10**-7 10**-7 eps C,D = map(int,readline().split()) map(int,readline().split()) C S = readline().rstrip() readline().rstrip() S
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

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

if C < D:#抜かさなくて良い
    if "##" not in S[A-1:D]:
        print("Yes")
    else:
        print("No")
else:#抜かす必要がある
    if "..." in S[B-2:D+1] and "##" not in S[A-1:C]:
        print("Yes")
    else:
        print("No")

