#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[101], b = 0, i, j, k, m, ctr = 0;
  cin >> n;
  char ch[101];
  cin >> ch;
  for (i = 0; i < n; i++) {
    if (ch[i] == '*') {
      arr[b] = i + 1;
      b++;
    }
  }
  for (i = 1; i <= 100; i++) {
    for (j = 0; j < b; j++) {
      ctr = 1;
      m = arr[j] + i;
      if (j != b - 1) {
        for (k = j + 1; m >= arr[k]; k++) {
          if (m == arr[k]) {
            ctr++;
            m += i;
          }
          if (ctr == 5) {
            cout << "yes";
            return 0;
          }
        }
      }
    }
  }
  cout << "no";
  return 0;
}
