#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100];
  cin >> n;
  string sp, s;
  getline(cin, sp);
  getline(cin, s);
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '*')
      a[i] = 1;
    else
      a[i] = 0;
  for (int i = 0; i < n - 1; i++)
    if (a[i] == 1) {
      int sl = 0;
      for (int j = i + 1; j < n; j++)
        if (a[j] == 1) {
          sl = 2;
          int h = j - i;
          for (int k = j + h; k < n; k += h)
            if (a[k] == 1)
              sl++;
            else
              break;
          if (sl == 5) {
            cout << "yes\n";
            return 0;
          }
        }
    }
  cout << "no\n";
}
