#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> v;
  bool l[10000] = {false};
  for (int i = 0; i < n; i++) {
    if (s[i] == '*') {
      v.push_back(i + 1);
      l[i + 1] = true;
    }
  }
  bool flag = false;
  if (v.size() < 5) {
    cout << "no\n";
    return 0;
  }
  for (int i = 0; i <= v.size() - 4; i++) {
    for (int j = 1; j <= n - 4; j++) {
      if (l[v[i] + j] && l[v[i] + j * 2] && l[v[i] + j * 3] &&
          l[v[i] + j * 4]) {
        flag = true;
      }
    }
  }
  if (flag) {
    cout << "yes\n";
  } else {
    cout << "no\n";
  }
  return 0;
}
