20
.*..*...*....*.....*
 97
****.***.***.*..**.**.*.*.***.*............*..*......*.***.**.*.***.*.***.*..*.**.*.***.**.*****.
 5
*.***
 4
****
 11
.*.*.*.*...
 72
.***.**.*.*...*****.*.*.*.*.**....**.*.**..*.*...**..***.**.**..*.**..**
 89
..**..**..*.********....*.*****.**.****...*......*******..*.**.*****..*..****....*...**..
 6
***.**
 54
...***.*...****.*..****....*..**..**..***.*..**...**..
 100
****************************************************************************************************
 53
*.*.****.*.*......**....**.***.*.*.**.*.*.***...*..*.
 87
*..*..***.**.*...****...*....***....***......*..*.*.*****.**..*.***...*.****..**.*..***
 90
**....****.***..***.*.*****...*.*.***..***.******.**...***..*...*****..*.**.**...*..**...*
 55
...*..*.*.**..*.*....*.****..****....*..***.*****..*..*
 21
*.*...*.*...*.*...*.*
 41
*******....*..*.**..***.*...****.***.*...
 31
.******.**.**....*.*********...
 64
*.***...**...*..*...*....*..***.*.*.*.***.*.**...**.*.*.*..*....
 10
*****....*
 99
**...*.*.*..*....**.***..*...***..***.**.*.....*.*....*...*.**.**.****..**..*.*..*.***....**...**.*
 69
.***...*.***.**...*....*.***.*..*....**.*...**....*.*..**....**..*.**
 99
.*.......................*.......................*.......................*.......................*.
 98
.**..**.*****..***...*.**..*..*....*******..**....*.****.**.*.....*.**..***.**..***.*******..****.
 57
**...*....**.**.*.******.**..**.*.....**.***..***...**..*
 64
***.*...*...*.***.....*.....**.*****.*.*...*..*.*..***..*...***.
 17
*...*...*...*...*
 100
*...............................................................................................****
 11
*...**..*.*
 1
.
 100
*.....................*.....................*.....................*.....................*...........
 56
**.*..*...***.*.**.**..**.*.*.*.**...*.**.**....*...**..
 99
***....*.....****.*.**.*.*.**.*.*.*..*...*..*...***..*.*...*.*...***.*.*...**.**.*******....**....*
 10
.*.*.*.*.*
 51
....****....*........*.*..**........*....****....*.
 17
.*..*..*.....*..*
 97
...*..*...*******.*.**..**..******.*.*..*****.*...***.*.**.**.**..**.******.****.*.***.**..*...**
 42
***.*..*.*.***...**..*..**....**..*..*...*
 5
*****
 42
..*...*.*..**..*.*.*..**...**.***.*.******
 71
**.**..*****.*.*.*.********.....*****.****.*..***...*.*.*.**.****.**.**
 5
.****
 99
.*..**..*..*..**...***.****.*...*....*****.....**..****.*..*....****..**..*****..*....**.*.**..**..
 42
.*.*...*..**.****...****..*.*.***....**...
 10
.*.*.*.*..
 1
*
 5
***.*
 16
*.**.**.**.*..*.
 100
*.......................*.......................*.......................*.......................*...
 7
***.***
 58
**.*.*.**..******.**.*..*.**.*.*******.**.*.**.*..*****.*.
 67
..**.*...*.....****.***.**.*....***..***.*..***.....*******.....*.*
 99
.*.......................*...............................................*.......................*.
 6
......
 11
.**.*..*.**
 15
..........*****
 75
..*.**..*.*****.......*....*.*.*..**.*.***.*.***....******.****.*.....****.
 45
.***..******....***..**..*.*.*.**..**..*.**..
 13
*..*..*..*..*
 5
**.**
 100
*****...............................................................................................
 99
..*.*..**.*.*.******.*.*.**.**.**.*..**.*.*****..*.*.****.*....**....*****.....***..**....***.*.*.*
 99
***************************************************************************************************
 5
****.

no yes no no no yes yes no yes yes yes yes yes yes no yes yes yes yes yes yes yes yes yes yes yes no no no yes yes yes yes no no yes yes yes yes yes no yes yes no no no yes yes no yes yes no no no yes yes yes yes no yes yes yes no
import java.util.*;

public class KingOfThieves<E> {
    private static char[] arr;
    private static int length;

    public static boolean solve(String len, String data) {
        length = new Integer(len);
        arr = data.toCharArray();

        int tmp = 0;
        int interval = 0;
        for (char c : arr) {
            if (c == '.') {
                ++tmp;
                interval = tmp < interval ? interval : tmp;
            }

            if (c == '*') {
                tmp = 0;
            }
        }

        ++interval;

        boolean flag = false;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == '*') {
                flag = walkThrough(interval, i);
            }
            if (flag) return true;
        }

        return false;
    }

    public static boolean walkThrough(int interval, int currentPosition) {
        boolean flag = false;
        if (checkRow(currentPosition,1)) {
            flag = true;
            return flag;
        }

        if (checkRow(currentPosition,interval)) {
            flag = true;
            return flag;
        }

        /*for (int i = 0; i < 4; ++i) {
            currentPosition += interval;
            if (currentPosition < length && arr[currentPosition] == '*') {
                flag = true;
            } else {
                return false;
            }
        }
        currentPosition += interval;
        currentPosition += interval;
        flag = currentPosition < length && arr[currentPosition] == '*' ? true : false;

        currentPosition += interval;
        flag = currentPosition < length && arr[currentPosition] == '*' ? true : false;*/

        return flag;
    }

    public static boolean checkRow(int currentPosition) {
        boolean flag = false;
        for (int i = 0; i < 4; ++i, ++currentPosition) {
            if (currentPosition + 1 < length && arr[currentPosition + 1] == '*') {
                flag = true;
            } else {
                return false;
            }
        }
    return flag;
    }
    public static boolean checkRow(int currentPosition,int interval) {
        boolean flag = false;
        for (int i = 0; i < 4; ++i, currentPosition+=interval) {
            if (currentPosition< length && arr[currentPosition] == '*') {
                flag = true;
            } else {
                return false;
            }
        }
        return flag;
    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.nextLine();
        String b = scanner.nextLine();
        if (solve(a, b)) {
            System.out.println("yes");
        } else {
            System.out.println("no");
        }
    }

 /*   public static <T> void someMethod(T t) {
        System.out.println(t.getClass());
    }

    public static Stack<Integer> sort(Stack<Integer> s) {
        Stack<Integer> r = new Stack<Integer>();
        while (!s.isEmpty()) {
            int tmp = s.pop();
            while (!r.isEmpty() && r.peek() > tmp) {
                s.push(r.pop());
            }
            r.push(tmp);
        }
        return r;
    }   */

}

//53
//*.*.****.*.*......**....**.***.*.*.**.*.*.***...*..*.