n, a, b, c, d = map(int, input().split())
S = input()

if c < d and (S[a-1:d+1].count("##") == 0):
    print("Yes")
    exit()

if c > d and (S[b-2:d+1].count("...") >= 1) and (S[a-1:d+1].count("##") == 0):
    print("Yes")
    exit()

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 c < d and (S[a-1:d+1].count("##") == 0):
    print("Yes")
    exit() c < d and (S[a-1:d+1].count("##") == 0) c < d c d S[a-1:d+1].count("##") == 0 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 "##" 0 print("Yes") print "Yes" exit() exit if c > d and (S[b-2:d+1].count("...") >= 1) and (S[a-1:d+1].count("##") == 0):
    print("Yes")
    exit() c > d and (S[b-2:d+1].count("...") >= 1) and (S[a-1:d+1].count("##") == 0) c > d and (S[b-2:d+1].count("...") >= 1) c > d c d S[b-2:d+1].count("...") >= 1 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 "..." 1 S[a-1:d+1].count("##") == 0 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 "##" 0 print("Yes") print "Yes" exit() exit print("No") print "No" c, d = map(int, input().split()) map(int, input().split()) c n, a, b, c, d = map(int, input().split()) map(int, input().split()) n b, c, d = map(int, input().split()) map(int, input().split()) b d = map(int, input().split()) map(int, input().split()) d a, b, c, d = map(int, input().split()) map(int, input().split()) a S = input() input() S
n, a, b, c, d = map(int, input().split())
S = input()

if c < d and (S[a-1:d+1].count("##") == 0):
    print("Yes")
    exit()

if c > d and (S[b-2:d+1].count("...") >= 1) and (S[a-1:d+1].count("##") == 0):
    print("Yes")
    exit()

print("No")
