#include <bits/stdc++.h>
using namespace std;
int main() {
  cout.sync_with_stdio(false);
  int x;
  cin >> x;
  string path;
  cin >> path;
  for (int i = 0; i < path.length(); i++) {
    if (path[i] == '.') continue;
    for (int j = 1; j <= path.length() / 4; j++) {
      int count = 0;
      for (int k = i + j; k < path.length(); k += j) {
        if (path[k] == '*')
          count++;
        else
          break;
      }
      if (count >= 4) {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
}
