import fractions
import sys
from functools import reduce
import math

input = sys.stdin.readline


def main():
    n, a, b, c, d = input_list()
    s = input()
    uses = s[a-1:d]
    if '##' in uses:
        print('No')
        exit()
    if c < d:
        print('Yes')
    else:
        end = d+1 if d < len(s) else d
        if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No')


def get_camulative(l):
    import itertools
    # 累積和
    return [0] + list(itertools.accumulate(l))

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def gcd(*numbers):
    return reduce(fractions.gcd, numbers)


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


if __name__ == "__main__":
    main() import fractions fractions import sys sys from functools import reduce import math math input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    n, a, b, c, d = input_list()
    s = input()
    uses = s[a-1:d]
    if '##' in uses:
        print('No')
        exit()
    if c < d:
        print('Yes')
    else:
        end = d+1 if d < len(s) else d
        if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No') main n, a, b, c, d = input_list() n input_list() input_list a b c d s = input() s input() input uses = s[a-1:d] uses s[a-1:d] s a-1:d a-1 a 1 d if '##' in uses:
        print('No')
        exit()
     '##' in uses '##' uses print('No') print 'No' exit() exit if c < d:
        print('Yes')
    else:
        end = d+1 if d < len(s) else d
        if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No') c < d c d print('Yes') print 'Yes' end = d+1 if d < len(s) else d end d+1 if d < len(s) else d d < len(s) d len(s) len s d+1 d 1 d if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No') '...' in s[b-2:end] '...' s[b-2:end] s b-2:end b-2 b 2 end print('Yes') print 'Yes' print('No') print 'No' def get_camulative(l):
    import itertools
    # 累積和
    return [0] + list(itertools.accumulate(l)) get_camulative import itertools itertools return [0] + list(itertools.accumulate(l)) [0] + list(itertools.accumulate(l)) [0] 0 list(itertools.accumulate(l)) list itertools.accumulate(l) itertools.accumulate itertools accumulate l l l def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) combinations_count return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) math.factorial(n) math.factorial math factorial n math.factorial(n - r) * math.factorial(r) math.factorial(n - r) math.factorial math factorial n - r n r math.factorial(r) math.factorial math factorial r n n r r def input_list():
    return list(map(int, input().split())) input_list return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def input_list_str():
    return list(map(str, input().split())) input_list_str return list(map(str, input().split())) list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y) lcm_base return (x * y) // fractions.gcd(x, y) (x * y) // fractions.gcd(x, y) x * y x y fractions.gcd(x, y) fractions.gcd fractions gcd x y x x y y def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1) lcm_list return reduce(lcm_base, numbers, 1) reduce(lcm_base, numbers, 1) reduce lcm_base numbers 1 numbers numbers def gcd(*numbers):
    return reduce(fractions.gcd, numbers) gcd return reduce(fractions.gcd, numbers) reduce(fractions.gcd, numbers) reduce fractions.gcd fractions gcd numbers *numbers def gcd_list(numbers):
    return reduce(fractions.gcd, numbers) gcd_list return reduce(fractions.gcd, numbers) reduce(fractions.gcd, numbers) reduce fractions.gcd fractions gcd numbers numbers numbers if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def input_list():
    return list(map(int, input().split())) def input_list():
    return list(map(int, input().split())) input_list def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) combinations_count def gcd_list(numbers):
    return reduce(fractions.gcd, numbers) def gcd_list(numbers):
    return reduce(fractions.gcd, numbers) gcd_list def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y) def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y) lcm_base def gcd(*numbers):
    return reduce(fractions.gcd, numbers) def gcd(*numbers):
    return reduce(fractions.gcd, numbers) gcd def input_list_str():
    return list(map(str, input().split())) def input_list_str():
    return list(map(str, input().split())) input_list_str def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1) def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1) lcm_list input = sys.stdin.readline sys.stdin.readline input def main():
    n, a, b, c, d = input_list()
    s = input()
    uses = s[a-1:d]
    if '##' in uses:
        print('No')
        exit()
    if c < d:
        print('Yes')
    else:
        end = d+1 if d < len(s) else d
        if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No') def main():
    n, a, b, c, d = input_list()
    s = input()
    uses = s[a-1:d]
    if '##' in uses:
        print('No')
        exit()
    if c < d:
        print('Yes')
    else:
        end = d+1 if d < len(s) else d
        if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No') main def get_camulative(l):
    import itertools
    # 累積和
    return [0] + list(itertools.accumulate(l)) def get_camulative(l):
    import itertools
    # 累積和
    return [0] + list(itertools.accumulate(l)) get_camulative
import fractions
import sys
from functools import reduce
import math

input = sys.stdin.readline


def main():
    n, a, b, c, d = input_list()
    s = input()
    uses = s[a-1:d]
    if '##' in uses:
        print('No')
        exit()
    if c < d:
        print('Yes')
    else:
        end = d+1 if d < len(s) else d
        if '...' in s[b-2:end]:
            print('Yes')
        else:
            print('No')


def get_camulative(l):
    import itertools
    # 累積和
    return [0] + list(itertools.accumulate(l))

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def gcd(*numbers):
    return reduce(fractions.gcd, numbers)


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


if __name__ == "__main__":
    main()
