#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  for (long long int gap = 1; gap < n; gap += 1) {
    for (long long int i = 0; i < n; i += 1) {
      long long int count = 0;
      for (long long int j = i; j < n; j += gap) {
        if (s[j] != '*') {
          break;
        }
        count++;
      }
      if (count == 5) {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
  return 0;
}
