#!/usr/bin/env python
# coding: utf-8

# In[1]:


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


# In[3]:


if C < D:
    if S[B-1:D].count("##") == 0 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")
else:
    if S[B-2:D+1].count("...") >= 1 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")


# In[ ]:



 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:
    if S[B-1:D].count("##") == 0 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")
else:
    if S[B-2:D+1].count("...") >= 1 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")


# In[ ]: C < D C D if S[B-1:D].count("##") == 0 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No") S[B-1:D].count("##") == 0 and S[A-1:C].count("##") == 0 S[B-1:D].count("##") == 0 S[B-1:D].count("##") [B-1:D].count [B-1:D] S B-1:D B-1 B 1 D 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 print("Yes") print "Yes" print("No") print "No" if S[B-2:D+1].count("...") >= 1 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")


# In[ ]: S[B-2:D+1].count("...") >= 1 and S[A-1:C].count("##") == 0 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: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 print("Yes") print "Yes" print("No") print "No" D = map(int, input().split()) map(int, input().split()) D C,D = map(int, input().split()) map(int, input().split()) C S = input() input() S B,C,D = map(int, input().split()) map(int, input().split()) B 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
#!/usr/bin/env python
# coding: utf-8

# In[1]:


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


# In[3]:


if C < D:
    if S[B-1:D].count("##") == 0 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")
else:
    if S[B-2:D+1].count("...") >= 1 and S[A-1:C].count("##") == 0:
        print("Yes")
    else:
        print("No")


# In[ ]:




