#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long llinf = 1e18 + 7;
const double eps = 1e-15;
const int mod = 1e6 + 7;
string s;
int n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> s;
  for (int i = 1; i < n; i++)
    for (int j = 0; j + 4 * i < n; j++)
      if (s[j] == '*' && s[j + i] == '*' && s[j + i * 2] == '*' &&
          s[j + i * 3] == '*' && s[j + i * 4] == '*') {
        return cout << "yes", 0;
      }
  return cout << "no", 0;
}
