#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  s = s + ".....";
  scanf("%d", &n);
  cin >> s;
  for (int j = 0; j < n - 4; j++)
    for (int i = 1; i <= (n - j) / 4; i++) {
      if (s[j] == '*' && s[j] == s[j + i] && s[j] == s[j + i + i] &&
          s[j] == s[j + i + i + i] && s[j] == s[j + i + i + i + i]) {
        cout << "yes";
        return 0;
      }
    }
  cout << "no";
  return 0;
}
