#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const double EPS = 1e-7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool ok = false;
  for (int l = 1; l <= n; l++) {
    for (int start = 0; start + 4 * l < (int)s.length(); start++) {
      ok = true;
      for (int i = 0; i < 5; i++)
        if (s[start + i * l] != '*') {
          ok = false;
          break;
        }
      if (ok) break;
    }
    if (ok) break;
  }
  if (ok)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
