#include <bits/stdc++.h>
using namespace std;
void splitstr(const string &s, vector<string> &v) {
  istringstream in(s);
  copy(istream_iterator<string>(in), istream_iterator<string>(),
       back_inserter(v));
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
const int maxn = 100005;
const long long INF = (1e9) + 7;
const long double EPS = 1e-8;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 1; i <= (int)n; i++) {
    for (int p = 0; p < (int)n; p++) {
      int j = p;
      int q = 0;
      while (j < n) {
        if (s[j] == '.') {
          while (j < n && s[j] == '.') j++;
          q = 0;
        }
        q++;
        if (q == 5) {
          cout << "yes";
          return 0;
        }
        j += i;
      }
    }
  }
  cout << "no";
  return 0;
}
