#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  cin >> n;
  cin >> s;
  int res = 0;
  bool r = false;
  for (int i = 1; i < 26; ++i) {
    for (int st = 0; st < n; ++st) {
      res = 0;
      for (int j = 0; j < 5 * i && st + j < n; j += i) {
        if (s[st + j] == '*') {
          ++res;
        }
      }
      if (res == 5) {
        r = true;
      }
    }
  }
  if (r) {
    cout << "yes";
  } else {
    cout << "no";
  }
  return 0;
}
