#include <bits/stdc++.h>
using namespace std;
int main() {
  string ch;
  int n;
  cin >> n;
  cin >> ch;
  for (int i = 0; i <= n; i++) {
    if (ch[i] == '*') {
      for (int j = 1; j <= n / 4; j++)
        if ((i + 4 * j) < n)
          if ((ch[j + i] == '*') && (ch[i + 2 * j] == '*') &&
              (ch[i + 3 * j] == '*') && (ch[i + 4 * j] == '*')) {
            cout << "yes";
            return 0;
          }
    }
  }
  cout << "no";
}
