#include <bits/stdc++.h>
using namespace std;
int n, a[110], dem;
char s[110];
bool flag;
int main() {
  scanf("%d\n", &n);
  for (int i = 1; i <= n; i++) scanf("%s\n", s + 1);
  for (int i = 1; i <= n; i++)
    if (s[i] == '*') {
      if (s[i] != s[i - 1])
        a[i] = ++dem;
      else
        a[i] = dem;
    }
  for (int len = 1; len <= n; len++)
    for (int i1 = 1; i1 <= n; i1++) {
      int i2 = i1 + len, i3 = i2 + len, i4 = i3 + len, i5 = i4 + len;
      if (i5 <= n && a[i1] && a[i2] && a[i3] && a[i4] && a[i5]) flag = true;
    }
  if (flag)
    cout << "yes";
  else
    cout << "no";
}
