def main():
    n,a,b,c,d=map(int, input().split())
    s = input()

    if("##" in s[a-1:c] or "##" in s[b-1:d]):return 0
    if(d>c):
        return 1
    else:
        if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0

if __name__ == '__main__':
    k=main()
    if(k):
        print("Yes")
    else:
        print("No") def main():
    n,a,b,c,d=map(int, input().split())
    s = input()

    if("##" in s[a-1:c] or "##" in s[b-1:d]):return 0
    if(d>c):
        return 1
    else:
        if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0 main 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("##" in s[a-1:c] or "##" in s[b-1:d]):return 0
     "##" in s[a-1:c] or "##" in s[b-1:d] "##" in s[a-1:c] "##" s[a-1:c] s a-1:c a-1 a 1 c "##" in s[b-1:d] "##" s[b-1:d] s b-1:d b-1 b 1 d if(d>c):
        return 1
    else:
        if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0 d>c d c return 1 1 if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0 "..." in s[b-2:d+1] "..." s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 return 1 1 return 0 0 if __name__ == '__main__':
    k=main()
    if(k):
        print("Yes")
    else:
        print("No") __name__ == '__main__' __name__ '__main__' k=main() k main() main if(k):
        print("Yes")
    else:
        print("No") k print("Yes") print "Yes" print("No") print "No" k=main() main() k def main():
    n,a,b,c,d=map(int, input().split())
    s = input()

    if("##" in s[a-1:c] or "##" in s[b-1:d]):return 0
    if(d>c):
        return 1
    else:
        if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0 def main():
    n,a,b,c,d=map(int, input().split())
    s = input()

    if("##" in s[a-1:c] or "##" in s[b-1:d]):return 0
    if(d>c):
        return 1
    else:
        if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0 main
def main():
    n,a,b,c,d=map(int, input().split())
    s = input()

    if("##" in s[a-1:c] or "##" in s[b-1:d]):return 0
    if(d>c):
        return 1
    else:
        if("..." in s[b-2:d+1]):
            return 1
        else:
            return 0

if __name__ == '__main__':
    k=main()
    if(k):
        print("Yes")
    else:
        print("No")
