# Problem A - Kenken Race

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

# initialization
is_ok = True

# search
if C>D:
    # b check
    if "##" in S[B-1:D] or not "..." in S[B-2:D+1]:
        is_ok = False

    # a check
    if "##" in S[A-1:C]:
        is_ok = False
else:
    # b check
    if "##" in S[B-1:D]:
        is_ok = False

    # a check
    if "##" in S[A-1:C]:
        is_ok = False

# output
if is_ok:
    print("Yes")
else:
    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 is_ok = True is_ok True if C>D:
    # b check
    if "##" in S[B-1:D] or not "..." in S[B-2:D+1]:
        is_ok = False

    # a check
    if "##" in S[A-1:C]:
        is_ok = False
else:
    # b check
    if "##" in S[B-1:D]:
        is_ok = False

    # a check
    if "##" in S[A-1:C]:
        is_ok = False

# output C>D C D if "##" in S[B-1:D] or not "..." in S[B-2:D+1]:
        is_ok = False

    # a check
     "##" in S[B-1:D] or not "..." in S[B-2:D+1] "##" in S[B-1:D] "##" S[B-1:D] S B-1:D B-1 B 1 D not "..." in S[B-2:D+1] "..." in S[B-2:D+1] "..." S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 is_ok = False is_ok False if "##" in S[A-1:C]:
        is_ok = False "##" in S[A-1:C] "##" S[A-1:C] S A-1:C A-1 A 1 C is_ok = False is_ok False if "##" in S[B-1:D]:
        is_ok = False

    # a check
     "##" in S[B-1:D] "##" S[B-1:D] S B-1:D B-1 B 1 D is_ok = False is_ok False if "##" in S[A-1:C]:
        is_ok = False

# output "##" in S[A-1:C] "##" S[A-1:C] S A-1:C A-1 A 1 C is_ok = False is_ok False if is_ok:
    print("Yes")
else:
    print("No") is_ok print("Yes") print "Yes" print("No") print "No" is_ok = True True is_ok is_ok = False False is_ok N, A, B, C, D = map(int, input().split()) map(int, input().split()) N is_ok = False False is_ok C, D = map(int, input().split()) map(int, input().split()) C is_ok = False False is_ok 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 is_ok = False False is_ok
# Problem A - Kenken Race

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

# initialization
is_ok = True

# search
if C>D:
    # b check
    if "##" in S[B-1:D] or not "..." in S[B-2:D+1]:
        is_ok = False

    # a check
    if "##" in S[A-1:C]:
        is_ok = False
else:
    # b check
    if "##" in S[B-1:D]:
        is_ok = False

    # a check
    if "##" in S[A-1:C]:
        is_ok = False

# output
if is_ok:
    print("Yes")
else:
    print("No")
