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