ZeptoLab Code Rush 2015
A
King of Thieves
Codeforces
1300
原题
←B →
翻译中…

In this problem you will meet the simplified model of game King of Thieves.

翻译中…

In a new ZeptoLab game called "King of Thieves" your aim is to reach a chest with gold by controlling your character, avoiding traps and obstacles on your way.

翻译中…

image

翻译中…

An interesting feature of the game is that you can design your own levels that will be available to other players. Let's consider the following simple design of a level.

翻译中…

A dungeon consists of $*n*$ segments located at a same vertical level, each segment is either a platform that character can stand on, or a pit with a trap that makes player lose if he falls into it. All segments have the same length, platforms on the scheme of the level are represented as '*' and pits are represented as '.'.

翻译中…

One of things that affects speedrun characteristics of the level is a possibility to perform a series of consecutive jumps of the same length. More formally, when the character is on the platform number $*i*_{1}$, he can make a sequence of jumps through the platforms $*i*_{1} < *i*_{2} < ... < *i*_{*k*}$, if $*i*_{2} - *i*_{1} = *i*_{3} - *i*_{2} = ... = *i*_{*k*} - *i*_{*k* - 1}$. Of course, all segments $*i*_{1}, *i*_{2}, ... *i*_{*k*}$ should be exactly the platforms, not pits.

翻译中…

Let's call a level to be good if you can perform a sequence of four jumps of the same length or in the other words there must be a sequence $*i*_{1}, *i*_{2}, ..., *i*_{5}$, consisting of five platforms so that the intervals between consecutive platforms are of the same length. Given the scheme of the level, check if it is good.

翻译中…

Input

翻译中…

The first line contains integer $*n*$ ($1 ≤ *n* ≤ 100$) — the number of segments on the level.

翻译中…

Next line contains the scheme of the level represented as a string of $*n*$ characters '*' and '.'.

翻译中…

Output

翻译中…

If the level is good, print the word "yes" (without the quotes), otherwise print the word "no" (without the quotes).

翻译中…

Note

翻译中…

In the first sample test you may perform a sequence of jumps through platforms $2, 5, 8, 11, 14$.

翻译中…

样例

Input #1
16
.**.*..*.***.**.
Output #1
yes
InputCopy OutputCopy
Input #2
11
.*.*...*.*.
Output #2
no
InputCopy OutputCopy
题目信息
题号
526A
时间限制
1 s
内存限制
256 MB
标签
暴力
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。