#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i)
    for (int interval = 1; interval <= n; ++interval) {
      int cnt = 0, cur = i;
      while (cur < n && s[cur] == '*') ++cnt, cur = cur + interval;
      if (cnt >= 5) goto END;
    }
  cout << "no";
  return 0;
END:
  cout << "yes";
  return 0;
}
