#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string h;
  cin >> h;
  for (int i = 1; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (j + 4 * i < n) {
        if ((h[j] == '*') && (h[j + i] == '*') && (h[j + 2 * i] == '*') &&
            (h[j + 3 * i] == '*') && (h[j + 4 * i] == '*')) {
          cout << "yes" << endl;
          return 0;
        }
      }
    }
  cout << "no" << endl;
  return 0;
}
