#include <bits/stdc++.h>
using namespace std;
const int M = 1000;
char in[M];
int main() {
  int n;
  bool mk = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> in[i];
  for (int i = 0; i < n; i++)
    if (in[i] == '*')
      for (int j = i + 1; j < i + (n - i) / 4 + 1; j++) {
        if (in[j] == '*' && in[j * 2 - i] == '*' && in[j * 3 - 2 * i] == '*' &&
            in[j * 4 - 3 * i] == '*') {
          cout << "yes";
          return 0;
        }
        if (in[j] == '*')
          cerr << in[i] << ' ' << in[j] << ' ' << in[j * 2 - i] << ' '
               << in[j * 3 - 2 * i] << ' ' << in[j * 4 - 3 * i] << '\n';
        cerr << i << '\t' << j << '\t';
      }
  cout << "no";
  return 0;
}
