#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool f = false;
  for (int i = 0; i < s.size(); ++i)
    for (int j = 1; j < 100; ++j) {
      if (i + j * 4 < s.size())
        if (s[i] == '*' && s[i + j] == '*' && s[i + j * 2] == '*' &&
            s[i + j * 3] == '*' && s[i + j * 4] == '*') {
          f = true;
        }
    }
  if (f) {
    cout << "yes";
  } else {
    cout << "no";
  }
  return 0;
}
