#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647, MOD = 1000 * 1000 * 1000 + 7;
const double eps = 1e-8;
void Error(string err) {
  cout << err;
  cerr << "_" << err << "_";
  exit(0);
}
int gcd(int a, int b) { return (b == 0) ? a : gcd(b, a % b); }
const int sz = 100 * 1000;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  bool can[1000];
  for (int i = 0; i < (n); i++) can[i] = (str[i] == '*');
  bool good = false;
  for (int k = 1; !good && k < n; k++) {
    for (int i = 0; i < n && !good; i++) {
      int cnt = 0;
      for (int j = i; j < n; j += k) {
        if (can[j])
          cnt++;
        else
          break;
      }
      if (cnt > 4) good = true;
    }
    int cnt = 0;
  }
  if (good)
    cout << "yes\n";
  else
    cout << "no\n";
  return 0;
}
