import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
void main(string[] args){ if(args.length > 1) if(args[1] == "-debug") DEBUG = 1; solve(); }
void log()(){ writeln(""); } void log(T, A ...)(T t, lazy A a){ if(DEBUG) write(t, " "), log(a); } bool DEBUG = 0; 
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //

void solve(){
	int h = read.to!int;
	int w = read.to!int;
	
	bool[][] as;
	foreach(i; 0 .. h){
		as ~= readln.chomp.to!(char[]).map!(x => x == '*').array;
	}
	
	string ans = "YES";
	
	bool f = 0;
	int i0, j0;
	foreach(i; 1 .. h - 1) foreach(j; 1 .. w - 1){
		if(as[i][j] && as[i - 1][j] && as[i + 1][j] && as[i][j - 1] && as[i][j + 1]){
			if(f == 0) i0 = i, j0 = j, f = 1;
			else ans = "NO";
		}
	}
	if(f == 0) ans = "NO";
	
	if(ans == "NO"){
		ans.writeln;
		return;
	}
	
	int t, b, l, r;
	foreach_reverse(i; 0 .. i0) if(!as[i][j0]) break; else t = i;
	foreach(i; i0 + 1 .. h) if(!as[i][j0]) break; else b = i;
	foreach_reverse(j; 0 .. j0) if(!as[i0][j]) break; else l = j;
	foreach(j; j0 + 1 .. w) if(!as[i0][j]) break; else r = j;
	
	
	foreach(i; 0 .. h) foreach(j; 0 .. w){
		if(i != i0 && j != j0 && as[i][j]) ans = "NO";
		if(i == i0 && (j < l || j > r) && as[i][j]) ans = "NO";
		if(j == j0 && (i < t || i > b) && as[i][j]) ans = "NO";
	}
	
	ans.writeln;
	
}

/*
	bool ng = 0;
	int[] ls, rs, ts, bs;
	foreach(i; 0 .. h){
		int f = 0;
		int l = -1, r = -1;
		foreach(j; 0 .. w){
			if(as[i][j]){
				if(f == 0) f = 1, l = j;
				else if(f == 2) ng = 1;
			}
			else{
				if(f == 1) f = 2, r = j;
			}
		}
		ls ~= l, rs ~= r;
	}
	foreach(j; 0 .. w){
		int f = 0;
		int t = -1, b = -1;
		foreach(i; 0 .. h){
			if(as[i][j]){
				if(f == 0) f = 1, t = i;
				else if(f == 2) ng = 1;
			}
			else{
				if(f == 1) f = 2, b = i;
			}
		}
		ts ~= t, bs ~= b;
	}
	

*/
