#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
char s[505][505];
int main()
{
int w, h, sw = 0, t = 0, markw = 0, mark = 0, l = 0;
bool mark1 = 0, mark2 = 0;
cin >> h >> w;
memset(s, 0, sizeof(s));
for (int i = 0;i < h;i++)
{
for (int j = 0;j < w;j++)
{
cin >> s[i][j];
}
}
for (int i = 0;i < h;i++)
{
for (int j = 0;j < w;j++)
{
if (s[i][j] == '*')
{
mark1 = 1;sw++;markw = i;
}
if (mark1 && s[i][j] == '.') mark2 = 1;
if (mark2 && s[i][j] == '*')
{
mark1 = 0;mark2 = 0;markw = 0;break;
}
}
if (mark1 && !mark2)
{
mark1 = 0;mark2 = 0;t = sw / 2 + 1;
if (sw % 2 != 0)
{
int hw = 0;
for (int j = 0;j < h;j++)
{
if (s[j][t] == '*')
{
mark1 = 1;hw++;
}
if (mark1 && s[j][t] == '.') mark2 = 1;
if (mark2 && s[j][t] == '*')
{
mark1 = 0;mark2 = 0;break;
}
}
if (mark1 && !mark2)
{
for (int j = 0;j < w;j++)
{
s[markw][j] = '.';
}
for (int j = 0;j < h;j++)
{
s[j][t] = '.';
}
for (int j = 0;j < h;j++)
{
for (int k = 0;k < w;k++)
{
if (s[j][k] == '*')
{
cout << "NO" << endl;
}
else mark++;
}
}
l = w * h;
if (mark == l)
{
cout << "YES" << endl;return;
}
}
}
}
sw = 0;
}
}