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

if c < d:
    print("Yes" if s[a - 1:d].count("##") == 0 else "No")
    #aからd-1までで二個あるとあうと
else:
    print("Yes" if s[a - 1:c].count("##") ==
          0 and s[b - 2:d + 1].count("...") > 0 else "No")
          #b-1からd+1までで飛び越すの

 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:
    print("Yes" if s[a - 1:d].count("##") == 0 else "No")
    #aからd-1までで二個あるとあうと
else:
    print("Yes" if s[a - 1:c].count("##") ==
          0 and s[b - 2:d + 1].count("...") > 0 else "No")
          #b-1からd+1までで飛び越すの c < d c d print("Yes" if s[a - 1:d].count("##") == 0 else "No") print "Yes" if s[a - 1:d].count("##") == 0 else "No" s[a - 1:d].count("##") == 0 s[a - 1:d].count("##") [a - 1:d].count [a - 1:d] s a - 1:d a - 1 a 1 d count "##" 0 "Yes" "No" print("Yes" if s[a - 1:c].count("##") ==
          0 and s[b - 2:d + 1].count("...") > 0 else "No") print "Yes" if s[a - 1:c].count("##") ==
          0 and s[b - 2:d + 1].count("...") > 0 else "No" s[a - 1:c].count("##") ==
          0 and s[b - 2:d + 1].count("...") > 0 s[a - 1:c].count("##") ==
          0 s[a - 1:c].count("##") [a - 1:c].count [a - 1:c] s a - 1:c a - 1 a 1 c count "##" 0 s[b - 2:d + 1].count("...") > 0 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 "..." 0 "Yes" "No" n, a, b, c, d = map(int, input().split()) map(int, input().split()) n a, b, c, d = map(int, input().split()) map(int, input().split()) a s = input() input() s d = map(int, input().split()) map(int, input().split()) d b, c, d = map(int, input().split()) map(int, input().split()) b c, d = map(int, input().split()) map(int, input().split()) c
n, a, b, c, d = map(int, input().split())
s = input()

if c < d:
    print("Yes" if s[a - 1:d].count("##") == 0 else "No")
    #aからd-1までで二個あるとあうと
else:
    print("Yes" if s[a - 1:c].count("##") ==
          0 and s[b - 2:d + 1].count("...") > 0 else "No")
          #b-1からd+1までで飛び越すの


