n, a, b, c, d = map(int, input().split())
s = input()
if c < d:
    flg = False
    for i in range(a - 1, c):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
    for i in range(b - 1, d):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
    print("Yes")

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

else:
    flg = False
    for i in range(a - 1, c):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
    flg = 0
    for i in range(b - 2, d + 1):
        if s[i] == ".":
            if flg == 2:
                print("Yes")
                exit()
            flg += 1
        else:
            flg = 0
    print("No") c < d c d flg = False flg False for i in range(a - 1, c):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
     i range(a - 1, c) range a - 1 a 1 c if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
     s[i] == "#" s[i] s i "#" if flg:
                print("No")
                exit()
             flg print("No") print "No" exit() exit flg = True flg True flg = False flg False for i in range(b - 1, d):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
     i range(b - 1, d) range b - 1 b 1 d if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
     s[i] == "#" s[i] s i "#" if flg:
                print("No")
                exit()
             flg print("No") print "No" exit() exit flg = True flg True flg = False flg False print("Yes") print "Yes" flg = False flg False for i in range(a - 1, c):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
     i range(a - 1, c) range a - 1 a 1 c if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
     s[i] == "#" s[i] s i "#" if flg:
                print("No")
                exit()
             flg print("No") print "No" exit() exit flg = True flg True flg = False flg False flg = 0 flg 0 for i in range(b - 2, d + 1):
        if s[i] == ".":
            if flg == 2:
                print("Yes")
                exit()
            flg += 1
        else:
            flg = 0
     i range(b - 2, d + 1) range b - 2 b 2 d + 1 d 1 if s[i] == ".":
            if flg == 2:
                print("Yes")
                exit()
            flg += 1
        else:
            flg = 0
     s[i] == "." s[i] s i "." if flg == 2:
                print("Yes")
                exit()
             flg == 2 flg 2 print("Yes") print "Yes" exit() exit flg += 1 flg 1 flg = 0 flg 0 print("No") print "No" flg = False False flg n, a, b, c, d = map(int, input().split()) map(int, input().split()) n flg = False False flg flg = False False flg c, d = map(int, input().split()) map(int, input().split()) c d = map(int, input().split()) map(int, input().split()) d flg = 0 0 flg flg = True True flg flg = True True flg flg = True True flg s = input() input() s flg = False False flg flg = 0 0 flg flg = False False flg a, b, c, d = map(int, input().split()) map(int, input().split()) a b, c, d = map(int, input().split()) map(int, input().split()) b flg += 1 1 flg
n, a, b, c, d = map(int, input().split())
s = input()
if c < d:
    flg = False
    for i in range(a - 1, c):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
    for i in range(b - 1, d):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
    print("Yes")

else:
    flg = False
    for i in range(a - 1, c):
        if s[i] == "#":
            if flg:
                print("No")
                exit()
            flg = True
        else:
            flg = False
    flg = 0
    for i in range(b - 2, d + 1):
        if s[i] == ".":
            if flg == 2:
                print("Yes")
                exit()
            flg += 1
        else:
            flg = 0
    print("No")
