#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1000000000")
using namespace std;
int n;
string s;
int main() {
  cin >> n;
  cin >> s;
  int st = 0;
  int len = n / 4;
  int ok;
  for (int(i) = (0); (i) < int(n); ++(i)) {
    for (int(j) = (1); (j) < int(len + 1); ++(j)) {
      int cnt = 0;
      if (i < n && s[i] == '*') cnt++;
      if (i + j < n && s[i + j] == '*') cnt++;
      if (i + 2 * j < n && s[i + 2 * j] == '*') cnt++;
      if (i + 3 * j < n && s[i + 3 * j] == '*') cnt++;
      if (i + 4 * j < n && s[i + 4 * j] == '*') cnt++;
      if (cnt == 5) {
        cout << "yes" << endl;
        return 0;
      }
    }
  }
  cout << "no" << endl;
  cin.sync();
  cin.get();
  return 0;
}
