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

public class fourteen {
    public static final int MOD = 1000000007;
	public static void main(String[] args) throws Exception
    {
        MyScanner input = new MyScanner();

        int n = input.nextInt();
        StringBuilder s = new StringBuilder(input.next());
        int big = 0;
        int cnt = 0;
        for(int i = 0; i < s.length(); i++)
        {
        	if(s.charAt(i) == '*')
        		cnt ++;
        	if(cnt > big)
        		big = cnt;
        	if(s.charAt(i) == '.')
        		cnt = 0;	
        }
        int first, last;
        first = last = 0;
        boolean b = false;
       // System.out.println("Big: " + big);
        if(s.charAt(0) == '*') b = true;
        
        for(int i = 0; i < s.length(); i++)
        {
        	if(s.charAt(i) == '*' && !b)
        	{
        		b = true;
        		first = i;
        		if(i - last > big)
        		{
        			//System.out.println(i +" " + last);
        			System.out.println("no");
        			return;
        		}
        		last = i;
        	}
        	if(s.charAt(i) == '*' && b)
        	{
        		last ++;
        	}
        	
        	else if(s.charAt(i) == '.')
        		b = false;
        }
        System.out.println("yes");

    }

    public static class MyScanner 
{
        BufferedReader br;
        StringTokenizer st;

        public MyScanner(String s) 
{

            try
            {
                br = new BufferedReader(new FileReader(s));
            } catch (IOException e)
            {
                e.printStackTrace();
            }

        }

        public MyScanner() 
{ 
            br = new BufferedReader(new InputStreamReader(System.in));
            st = new StringTokenizer("");
        }

        public String next() 
{
            if (st == null || !st.hasMoreElements()) 
{
                    try 
{
                        String line = br.readLine();
                        if (line == null) {
                            throw new UnknownError();
                        }
                        while (line.trim().equals("")) {
                            line = br.readLine();
                            if (line == null) {
                                throw new UnknownError();
                            }
                        }
                        st = new StringTokenizer(line);
                    } 
catch (IOException e) 
{
                        throw new UnknownError();
                    }
            }
            return st.nextToken();
        }

        public String nextLine() {
            try {
                String line = br.readLine();
                if (line == null) {
                    throw new UnknownError();
                }
                return line;
            }
            catch (IOException e) {
                throw new UnknownError();
            }
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

    }
}
