#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
char s[1000];
int main() {
  int n;
  cin >> n;
  scanf("%s", s + 1);
  int flag = 0;
  for (int i = 0; i <= n; i++) {
    for (int j = 1; j <= 100; j++) {
      if (s[i] == '*' && s[i + j] == '*' && s[i + 2 * j] == '*' &&
          s[i + 3 * j] == '*' && s[i + 4 * j] == '*') {
        cout << "yes" << endl;
        return 0;
      }
    }
  }
  cout << "no" << endl;
}
