#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string in;
  cin >> in;
  int aux;
  int jump, k = 0;
  for (int i = 0; i < n; i++) {
    for (jump = 1; jump < n / 2 + 5; jump++) {
      k = 0;
      for (int j = i; j < n && k <= 4 && in[j] == '*'; j += jump, k++)
        ;
      if (k >= 5) {
        cout << "yes" << endl;
        return 0;
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
