#!/usr/bin/env python3
n, a, b, c, d = map(int, input().split())
s = input()
if c < d:
    print("YNeos"[any(s[i:i + 2] == "##" for i in range(a, d - 1))::2])
else:
    if any(s[i:i + 3] == "..." for i in range(b - 2, d - 1)):
        if all(s[i:+2] != "##" for i in range(a, c - 1)):
            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:
    print("YNeos"[any(s[i:i + 2] == "##" for i in range(a, d - 1))::2])
else:
    if any(s[i:i + 3] == "..." for i in range(b - 2, d - 1)):
        if all(s[i:+2] != "##" for i in range(a, c - 1)):
            print("Yes")
            exit()
    print("No") c < d c d print("YNeos"[any(s[i:i + 2] == "##" for i in range(a, d - 1))::2]) print "YNeos"[any(s[i:i + 2] == "##" for i in range(a, d - 1))::2] "YNeos" any(s[i:i + 2] == "##" for i in range(a, d - 1))::2 any(s[i:i + 2] == "##" for i in range(a, d - 1)) any s[i:i + 2] == "##" s[i:i + 2] s i:i + 2 i i + 2 i 2 "##" 2 if any(s[i:i + 3] == "..." for i in range(b - 2, d - 1)):
        if all(s[i:+2] != "##" for i in range(a, c - 1)):
            print("Yes")
            exit()
     any(s[i:i + 3] == "..." for i in range(b - 2, d - 1)) any s[i:i + 3] == "..." s[i:i + 3] s i:i + 3 i i + 3 i 3 "..." if all(s[i:+2] != "##" for i in range(a, c - 1)):
            print("Yes")
            exit()
     all(s[i:+2] != "##" for i in range(a, c - 1)) all s[i:+2] != "##" s[i:+2] s i:+2 i +2 2 "##" print("Yes") print "Yes" exit() exit print("No") print "No" b, c, d = map(int, input().split()) map(int, input().split()) b c, d = map(int, input().split()) map(int, input().split()) c s = input() input() s 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 d = map(int, input().split()) map(int, input().split()) d
#!/usr/bin/env python3
n, a, b, c, d = map(int, input().split())
s = input()
if c < d:
    print("YNeos"[any(s[i:i + 2] == "##" for i in range(a, d - 1))::2])
else:
    if any(s[i:i + 3] == "..." for i in range(b - 2, d - 1)):
        if all(s[i:+2] != "##" for i in range(a, c - 1)):
            print("Yes")
            exit()
    print("No")
