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