#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[105] = {0};
  int n;
  cin >> n;
  string s;
  cin >> s;
  int i, j;
  for (i = 1; i <= n; i++) {
    if (s[i - 1] == '*') a[i] = 1;
  }
  int flag = 0;
  int save;
  for (i = 1; i <= n; i++) {
    if (a[i]) {
      for (j = i + 1; j <= n;) {
        if (a[j]) {
          int d = j - i;
          int k = j + d;
          int cnt = 0;
          flag = 0;
          while (a[k] == 1) {
            k += d;
            cnt++;
          }
          if (cnt == 3) {
            flag = 1;
            break;
          }
        }
        j++;
      }
    }
    if (flag) {
      break;
    }
  }
  if (flag == 1)
    cout << "yes\n";
  else
    cout << "no\n";
}
