#include <bits/stdc++.h>
using namespace std;
int CONST = 'z' - 'a' + 1;
struct Node {
  Node() {
    chars.resize(CONST);
    for (int i = 0; i < CONST; i++) chars[i].reset(nullptr);
  }
  vector<unique_ptr<Node> > chars;
};
int prefix(Node* node, const string& word, int index) {
  while (true) {
    if (index == word.size()) return word.size();
    char c = word[index];
    if (node->chars[c - 'a'].get() == nullptr) return index + 1;
    node = node->chars[c - 'a'].get();
    ++index;
  }
}
void add(Node* node, const string& word, int index) {
  while (true) {
    if (index == word.size()) return;
    char c = word[index];
    if (node->chars[c - 'a'].get() == nullptr)
      node->chars[c - 'a'].reset(new Node());
    node = node->chars[c - 'a'].get();
    index++;
  }
}
int main() {
  int k;
  cin >> k;
  string T;
  cin >> T;
  for (int i = 0; i < T.size(); ++i) {
    for (int j = 1; j < T.size(); j++) {
      for (int l = i; l <= i + j * 4; l += j) {
        if (l < T.size() && T[l] == '*') {
          if (l == i + j * 4) {
            cout << "yes" << endl;
            return 0;
          }
        } else {
          break;
        }
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
