#include <bits/stdc++.h>
using namespace std;
int N;
string S;
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> N >> S;
  for (i = 0; i < N; i++)
    for (x = 1; x <= N; x++)
      if (i + 4 * x < N) {
        if (S[i] != '*') continue;
        if (S[i + x] != '*') continue;
        if (S[i + x * 2] != '*') continue;
        if (S[i + x * 3] != '*') continue;
        if (S[i + x * 4] != '*') continue;
        return (void)printf("yes\n");
      }
  cout << "no" << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < argc - 1; i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < s.size(); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
