#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '*') v.push_back(i + 1);
  }
  bool ko = false;
  for (long long i = 0; i < v.size(); i++) {
    bool ok = false;
    for (long long j = i + 1; j < v.size(); j++) {
      long long d = v[j] - v[i];
      long long prev = v[j];
      long long ans = 2;
      for (long long k = j + 1; k < v.size(); k++) {
        if ((v[k] - prev) == d) {
          ans++;
          prev = v[k];
        }
      }
      if (ans >= 5) {
        ok = true;
        break;
      }
    }
    if (ok == true) {
      ko = true;
      break;
    }
  }
  if (ko == true)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
