import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

    flg = False
    for i in range(a, d):
        if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

        if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
    else:
        if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No")


if __name__ == '__main__':
    resolve() import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 f_inf = float('inf') f_inf float('inf') float 'inf' mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 def resolve():
    n, a, b, c, d = map(int, input().split())
    s = input()

    flg = False
    for i in range(a, d):
        if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

        if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
    else:
        if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No") resolve 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 flg = False flg False for i in range(a, d):
        if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

        if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
    else:
        if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No") i range(a, d) range a d if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

         s[i] == "#" s[i] s i "#" if s[i + 1] == "#":
                print("No")
                break

         s[i + 1] == "#" s[i + 1] s i + 1 i 1 "#" print("No") print "No" break if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
     b - 1 <= i b - 1 b 1 i if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
     i + 1 < n i + 1 i 1 n if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
     s[i - 1] == s[i] == s[i + 1] == "." s[i - 1] == s[i] == s[i + 1] s[i - 1] == s[i] s[i - 1] s i - 1 i 1 s[i] s i s[i + 1] s i + 1 i 1 "." flg = True flg True if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No") c < d c d print("Yes") print "Yes" if flg:
                print("Yes")
            else:
                print("No") flg print("Yes") print "Yes" print("No") print "No" if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve f_inf = float('inf') float('inf') f_inf mod = 10 ** 9 + 7 10 ** 9 + 7 mod def resolve():
    n, a, b, c, d = map(int, input().split())
    s = input()

    flg = False
    for i in range(a, d):
        if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

        if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
    else:
        if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No") def resolve():
    n, a, b, c, d = map(int, input().split())
    s = input()

    flg = False
    for i in range(a, d):
        if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

        if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
    else:
        if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No") resolve
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

    flg = False
    for i in range(a, d):
        if s[i] == "#":
            if s[i + 1] == "#":
                print("No")
                break

        if b - 1 <= i:
            if i + 1 < n:
                if s[i - 1] == s[i] == s[i + 1] == ".":
                    flg = True
    else:
        if c < d:
            print("Yes")
        else:
            if flg:
                print("Yes")
            else:
                print("No")


if __name__ == '__main__':
    resolve()
