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