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