#include <bits/stdc++.h>
using namespace std;
const int maxN = 101;
int main() {
  int n, maxJump[maxN][maxN] = {};
  char level[maxN];
  cin >> n >> level;
  for (int i = 0; i < n; i++)
    if (level[i] == '*')
      for (int j = 0; j < n; j++) {
        if (j <= i) {
          maxJump[i][j] = maxJump[i - j][j] + 1;
          if (maxJump[i][j] == 5) {
            cout << "yes " << endl;
            return 0;
          }
        } else
          maxJump[i][j] = 1;
      }
  cout << "no" << endl;
  return 0;
}
