#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d\n", &n);
  string s;
  getline(cin, s);
  bool b = false;
  vector<int> v;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '*') v.push_back(i);
  }
  for (int i = 0; i < v.size(); i++) {
    int c = 1;
    int a = v[i];
    while (a + c < s.size()) {
      int c2 = a;
      int c3 = 0;
      while (c2 < s.size()) {
        c2 += c;
        if (c2 >= s.size() || s[c2] == '.') break;
        c3++;
      }
      if (c3 >= 4) {
        b = true;
        break;
      }
      c++;
    }
    if (b) break;
  }
  if (b)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
