#include <bits/stdc++.h>
using namespace std;
int n;
char s[500];
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> s;
  for (int i = 0; i < n - 3; ++i) {
    if (s[i] == '*') {
      for (int j = i + 1; j < n - 2; ++j) {
        if (s[j] == '*') {
          if (s[i + (j - i) * 2] == '*' && s[i + (j - i) * 3] == '*' &&
              s[i + (j - i) * 4] == '*') {
            cout << "yes\n";
            return 0;
          }
        }
      }
    }
  }
  cout << "no\n";
}
