#include <bits/stdc++.h>
using namespace std;
char arr[108];
int main() {
  int i, j, k, t, n, m, a, b, c, x, y, z;
  cin >> n;
  int flag = 0;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  int gap, cnt = 0;
  for (i = 1; i <= n; i++) {
    if (arr[i] == '*') {
      for (j = i + 1; j <= i + n / 4; j++) {
        if (arr[j] == '*') {
          cnt = 0;
          gap = j - i;
          for (k = j; k <= n; k += gap) {
            if (arr[k] == '*') {
              cnt++;
              if (cnt >= 4) {
                flag = 1;
                break;
              }
            } else
              break;
          }
        }
        if (flag == 1) break;
      }
      if (flag == 1) break;
    }
  }
  if (flag == 1)
    cout << "yes";
  else
    cout << "no";
  return 0;
}
