#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ma = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < n; j++) {
      int le = 0;
      for (int k = j; k < n; k += i) {
        if (s[k] == '*') {
          le++;
          ma = max(le, ma);
        } else
          le = 0;
      }
    }
  }
  if (ma >= 5)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
