#include <bits/stdc++.h>
using namespace std;
template <class T>
string toStr(const T &x) {
  stringstream s;
  s << x;
  return s.str();
}
template <class T>
int toInt(const T &x) {
  stringstream s;
  s << x;
  int r;
  s >> r;
  return r;
}
int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (s[i] != '*' || i + j * 4 >= n) continue;
      if (s[i + j] == '*' && s[i + j * 2] == '*' && s[i + j * 3] == '*' &&
          s[i + j * 4] == '*') {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
  return 0;
}
