#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int res = 0;
  for (int i = 0; i < n && !res; i++) {
    if (s[i] == '.') continue;
    for (int j = 1; j < n && !res; j++) {
      int d = 0;
      for (int k = 1; k < 5 && i + j * k < n; k++) {
        if (s[i + j * k] == '*')
          d++;
        else
          break;
      }
      if (d == 4) res = 1;
    }
  }
  if (res)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
