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.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main
{

    private static Reader reader;

    public static void main(String[] args)
    throws IOException
    {
        reader = new Reader();

		reader.readLine();
		int l = reader.readInt(0);

		reader.readLine();
		String st = reader.readString(0);

		int v,co;
		boolean f = false;
		for (int i=1;i<l;++i)
		{

			//System.out.println("i " + i);

			for (int j=0;;++j)
			{
				v = j + 4 * i;

				//System.out.println("v " + v);

				if (v >= l)
					break;

				co = 0;
				if (st.charAt(j) == '*')
					for (int k=j;k <= v;k += i)
					{
						if (st.charAt(k) == '*')
							++co;
						else
							break;
					}

				//System.out.println("co " + co);

				if (co == 5)	
				{
					f = true;
					break;
				}
			}

			if (f)
				break;
		}

		if (f)
			System.out.println("yes");
		else
			System.out.println("no");


		reader.close();
    }
}

class Pair implements Comparable<Pair>
{
    int f,s;

    public Pair(int f, int s)
    {
        this.f = f;
        this.s = s;
    }

    @Override
    public int compareTo(Pair p1)
    {
        // TODO: Implement this method
        if (f != p1.f)
            return p1.s - s;
        return p1.f - f;

    }
}

class Reader
{
    private BufferedReader reader;
    private String line[];

    public Reader()
    {
        reader = new BufferedReader(
            new InputStreamReader(System.in));
    }

    public void readLine()
    throws IOException
    {
        line = reader.readLine().split(" ");
    }

    public int readInt(int pos)
    throws IOException
    {
        return Integer.parseInt(line[pos]);
    }

    public double readDouble(int pos)
    throws IOException
    {
        return Double.parseDouble(line[pos]);
    }

    public long readLong(int pos)
    throws IOException
    {
        return Long.parseLong(line[pos]);
    }

    public String readString(int pos)
    throws IOException
    {
        return line[pos];
    }

    public void close()
    throws IOException
    {
        reader.close();
    }
}