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