#include <bits/stdc++.h>
using namespace std;
char s[100000];
int main() {
  int m, n, j, k, l, t, ll;
  bool is = false;
  cin >> t;
  cin >> s;
  if (t < 5) {
    cout << "no" << endl;
    return 0;
  }
  l = t / 5;
  ll = t % 5;
  for (j = 0; j < t && !is; j++)
    for (k = 1; k < t && !is; k++)
      if (j + 4 * k < t && s[j] == '*' && s[j + 2 * k] == '*' &&
          s[j + k] == '*' && s[j + 3 * k] == '*' && s[j + 4 * k] == '*') {
        is = true;
      }
  if (is)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
