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