#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, flag = 0;
  cin >> n;
  char a[1000];
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n / 3; j++) {
      int k = i;
      int p = 0;
      while (a[k] == '*' && p < 5) {
        k += j;
        p++;
      }
      if (p >= 5) {
        cout << "yes" << endl;
        flag = 1;
      }
      if (flag == 1) break;
    }
    if (flag == 1) break;
  }
  if (flag == 0) cout << "no" << endl;
  return 0;
}
