#include <bits/stdc++.h>
using namespace std;
int n, cnt;
char s[111];
void dfs(int id, int d) {
  if (id >= n) return;
  if (s[id] == '*')
    cnt++;
  else
    return;
  dfs(id + d, d);
}
int main() {
  scanf("%d\n", &n);
  gets(s);
  bool fl = 0;
  for (int i = 0; i < n; ++i) {
    for (int d = 1; d <= n; ++d) {
      cnt = 0;
      dfs(i, d);
      if (cnt >= 5) fl = 1;
    }
  }
  if (fl) {
    puts("yes");
  } else
    puts("no");
  return 0;
}
