#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> s;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '*')
      for (long long t = 1; t <= n - 1; t++) {
        bool check = true;
        for (long long j = 0; j < 5; j++)
          if (i + j * t >= n || s[i + j * t] == '.') check = false;
        if (check == 1) {
          cout << "yes";
          return 0;
        }
      }
  }
  cout << "no" << endl;
  return 0;
}
