#include <bits/stdc++.h>
using namespace std;
const int N = 510;
char a[N][N];
int n, m;
int lt[N][N], rt[N][N], up[N][N], dw[N][N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", a[i] + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '*') {
        lt[i][j] = lt[i][j - 1] + 1;
        up[i][j] = up[i - 1][j] + 1;
      }
    }
  }
  for (int i = n; i >= 1; i--) {
    for (int j = m; j >= 1; j--) {
      if (a[i][j] == '*') {
        rt[i][j] = rt[i][j + 1] + 1;
        dw[i][j] = dw[i + 1][j] + 1;
      }
    }
  }
  bool f = false;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '*' && rt[i][j] >= 2 && lt[i][j] >= 2 && up[i][j] >= 2 &&
          dw[i][j] >= 2) {
        f = true;
        for (int k = j - lt[i][j] + 1; k <= j + rt[i][j] - 1; k++) {
          a[i][k] = '.';
        }
        for (int k = i - up[i][j] + 1; k <= i + dw[i][j] - 1; k++) {
          a[k][j] = '.';
        }
      }
      if (f) break;
    }
    if (f) break;
  }
  if (!f) {
    puts("NO");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '*') {
        puts("NO");
        return 0;
      }
    }
  }
  puts("YES");
  return 0;
}
