#include <bits/stdc++.h>
using namespace std;
int F(const void* l, const void* r) { return (*(int*)l - *(int*)r); }
const long long inf = 10000000007;
int n;
char s[1000];
int main() {
  ios::ios_base::sync_with_stdio(false);
  cin >> n;
  int k;
  for (long long i = 1; i <= 700; i++) s[i] = '.';
  for (long long i = 1; i <= n; i++) cin >> s[i];
  for (long long i = 1; i <= n; i++) {
    if (s[i] == '*') {
      for (long long j = 1; j <= n; j++) {
        if (s[i + j] == '*' && s[i + 2 * j] == '*' && s[i + 3 * j] == '*' &&
            s[i + 4 * j] == '*') {
          cout << "yes" << endl;
          return 0;
        };
      }
    }
  }
  cout << "no";
  return 0;
}
