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.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }
  
  int m;
  int k;
 
  int n;
  
  String s;
  String ns = "";
  boolean[] use;
  long c = 0;
  int[] ch;
  int[][]  w;
  int cnt;
  int inf = 2000000000;
  int max;
  int[][] g;
  int[][] b;
  int[] used;
  long[] dp;
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );
     
    
     int n = in.nextInt();
     String s = in.next();
     char[] a = s.toCharArray();
     int k = 1;
     boolean ans = false;
    
     int j = 0;
     for (k = 1; k < n; k++) {
	     for (j = 0; j < n-k; j++) { 
	     ans = true;
	     for (int i = 0; i <= 4; i++) {
	    	 if (j < n && a[j] == '*') {
	    		 j+= k;
	    	 }
	    	 else {
	    		 ans = false;
	    		 break;
	    	 }	 
	     }
	     if (ans) {
    		 System.out.println("yes");
    		 System.exit(0);
    	 }
	  }
     }
     System.out.println("no");
     out.flush();
     out.close();
      
  }
 
  void dfs(int v) {
	  //use[v] = true;
	  for (int i = 0; i < 1010; i++) {
		  if (g[v][i] == 1 && !use[i]) {
			  g[v][i] = 0;
			  g[i][v] = 0;
			  dfs(i);
			  cnt++;
		  }
	  }
  }
  
  class Pair {
	  int x;
	  int y;
	  int v;
	  Pair(int x, int y, int v) {
		  this.x = x;
		  this.y = y;
		  this.v = v;
	  }
  }
  
  long pow(int x, int m) {
	  if (m == 0)
		  return 1;
	  return x*pow(x, m-1);
  }
  
  
  class Reader {
      
      BufferedReader br;
      StringTokenizer token = null;
      
      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }
      
      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
        	  try {
        		  token = new StringTokenizer(br.readLine());
        	  }
        	  catch (Exception e) {
        		  return null;
        	  }
          }
          return token.nextToken();
      }
      
      int nextInt() throws Exception {
          return Integer.parseInt(next());
      }
      
      long nextLong() throws Exception {
          return Long.parseLong(next());
      }
      
      double nextDouble() throws Exception {
          return Double.parseDouble(next());
      }
      
      char nextChar() throws Exception {
          return next().charAt(0); 
      }
      
      String nextString() throws IOException {
    	  return br.readLine();
      }
      
  }
}