#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool neg = false;
  for (int i = 1; i <= n / 4 && !neg; i++) {
    for (int k = 0; k <= n - 1 - 4 * i; k++)
      if (s[k] == '*' && s[k + i] == '*' && s[k + 2 * i] == '*' &&
          s[k + 3 * i] == '*' && s[k + 4 * i] == '*')
        neg = true;
  }
  if (neg)
    cout << "yes";
  else
    cout << "no";
  return 0;
}
