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.Scanner;
import java.util.TreeSet;


public class A {
    public static void main(String[] args) {
        Scanner sanat  = new Scanner(System.in);
        int n =sanat.nextInt();
        String s = sanat.next();
        int []x = new int[s.length()+1];
        int k = 0;
        TreeSet<Integer> ts1 = new TreeSet<Integer>();
        TreeSet<Integer> ts2 = new TreeSet<Integer>();
        for (int i = 1; i <= s.length(); i++) {
            if(s.substring(i-1, i).equals("*")){
                x[++k]=i;
                ts1.add(i);
            }
        }
        for (int i = 1; i <k; i++) {
            for (int j = i+1; j <=k; j++) {
                ts2.add(Math.abs(x[i]-x[j]));
            }
        }
        for (int i =1; i <= k; i++) {
            for (Integer in : ts2){ 
                int cnt = 0;
                int d = x[i];
                while(ts1.contains(d+in)){
                    d+=in;
                    cnt++;
//                  System.out.println(d);
                    if(cnt>=4){
                        System.out.println("yes");
                        return;
                    }
                }
            }
        }
        System.out.println("no");
//      for (int l =1; l<k-1; l++) {
//          for (int i=l+1; i<k; i++) {
//              int cnt = 0;
//              int d = x[i]-x[l];
//              System.out.println(d+" mee");
//              for (int j =i+1; j<=k; j++) {
//                  if(d==x[j]-x[j-1]){
//                      cnt++;
//                      System.out.println(cnt);
//                      if(cnt>=4){
//                          System.out.println("yes");
//                          return;
//                      }
//                  } else{
//                      cnt = 0;
//                      
//                      break;
//                  }
//              }       
//          }
//      }
    }
}
