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