#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char c[100] = "";
  cin >> c;
  bool f = false;
  for (int k = 1; k < 26; k++)
    for (int j = 0; j < n; j++)
      if (j + 4 * k < n)
        if ((c[j] == c[j + k]) && (c[j + k] == c[j + 2 * k]) &&
            (c[j + 2 * k] == c[j + 3 * k]) && (c[j + 3 * k] == c[j + 4 * k]) &&
            (c[j] == '*'))
          f = true;
  if (f == true)
    cout << "yes";
  else
    cout << "no";
  return 0;
}
