n, a, b, c, d = map(lambda x: int(x)-1, input().split())
s = input()


def can_reach(x, y):
    return 0 == s[x:y+1].count('##')


def can_reach_cross(x, y, a, b):
    t = s[x:y+1]
    if 0 != t.count('##'):
        return False
    if '...' in s[a-1:b+2]:
        return True
    return False


if c < d:
    # parallel
    if can_reach(a, c) and can_reach(b, d):
        print('Yes')
    else:
        print('No')
else:
    # cross
    if can_reach(b, d) and can_reach_cross(a, c, b, d):
        print('Yes')
    else:
        print('No') n, a, b, c, d = map(lambda x: int(x)-1, input().split()) n map(lambda x: int(x)-1, input().split()) map lambda x: int(x)-1 int(x)-1 int(x) int x 1 x input().split() ().split () input split a b c d s = input() s input() input def can_reach(x, y):
    return 0 == s[x:y+1].count('##') can_reach return 0 == s[x:y+1].count('##') 0 == s[x:y+1].count('##') 0 s[x:y+1].count('##') [x:y+1].count [x:y+1] s x:y+1 x y+1 y 1 count '##' x x y y def can_reach_cross(x, y, a, b):
    t = s[x:y+1]
    if 0 != t.count('##'):
        return False
    if '...' in s[a-1:b+2]:
        return True
    return False can_reach_cross t = s[x:y+1] t s[x:y+1] s x:y+1 x y+1 y 1 if 0 != t.count('##'):
        return False
     0 != t.count('##') 0 t.count('##') t.count t count '##' return False False if '...' in s[a-1:b+2]:
        return True
     '...' in s[a-1:b+2] '...' s[a-1:b+2] s a-1:b+2 a-1 a 1 b+2 b 2 return True True return False False x x y y a a b b if c < d:
    # parallel
    if can_reach(a, c) and can_reach(b, d):
        print('Yes')
    else:
        print('No')
else:
    # cross
    if can_reach(b, d) and can_reach_cross(a, c, b, d):
        print('Yes')
    else:
        print('No') c < d c d if can_reach(a, c) and can_reach(b, d):
        print('Yes')
    else:
        print('No') can_reach(a, c) and can_reach(b, d) can_reach(a, c) can_reach a c can_reach(b, d) can_reach b d print('Yes') print 'Yes' print('No') print 'No' if can_reach(b, d) and can_reach_cross(a, c, b, d):
        print('Yes')
    else:
        print('No') can_reach(b, d) and can_reach_cross(a, c, b, d) can_reach(b, d) can_reach b d can_reach_cross(a, c, b, d) can_reach_cross a c b d print('Yes') print 'Yes' print('No') print 'No' c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) c s = input() input() s n, a, b, c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) n def can_reach(x, y):
    return 0 == s[x:y+1].count('##') def can_reach(x, y):
    return 0 == s[x:y+1].count('##') can_reach def can_reach_cross(x, y, a, b):
    t = s[x:y+1]
    if 0 != t.count('##'):
        return False
    if '...' in s[a-1:b+2]:
        return True
    return False def can_reach_cross(x, y, a, b):
    t = s[x:y+1]
    if 0 != t.count('##'):
        return False
    if '...' in s[a-1:b+2]:
        return True
    return False can_reach_cross a, b, c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) a d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) d b, c, d = map(lambda x: int(x)-1, input().split()) map(lambda x: int(x)-1, input().split()) b
n, a, b, c, d = map(lambda x: int(x)-1, input().split())
s = input()


def can_reach(x, y):
    return 0 == s[x:y+1].count('##')


def can_reach_cross(x, y, a, b):
    t = s[x:y+1]
    if 0 != t.count('##'):
        return False
    if '...' in s[a-1:b+2]:
        return True
    return False


if c < d:
    # parallel
    if can_reach(a, c) and can_reach(b, d):
        print('Yes')
    else:
        print('No')
else:
    # cross
    if can_reach(b, d) and can_reach_cross(a, c, b, d):
        print('Yes')
    else:
        print('No')
