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