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