# Problem A - Kenken Race

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

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

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

# check
if C<D:
    # B check
    is_ok = True
    for i in range(B, D-1):
        if S[i]=='#' and S[i+1]=='#':
            is_ok = False
            break
    # A check
    for i in range(A, C-1):
        if S[i]=='#' and S[i+1]=='#':
            is_ok = False
            break
    # output
    if is_ok:
        print("Yes")
    else:
        print("No")
else:
    is_ok = False
    # B check
    for i in range(B, D):
        if S[i]=='#' and S[i+1]=='#':
            is_ok = False
            break
    for i in range(B-1, D):
        if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':
            is_ok = True
    # A check
    for i in range(A, C-1):
        if S[i]=='#' and S[i+1]=='#':
            is_ok = False
            break
    # output
    if is_ok:
        print("Yes")
    else:
        print("No")
