#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e16 + 3;
const int mod = 1e9 + 7;
const int lim = 6e2 + 2;
int h, w;
int mt[lim][lim];
string str;
void solve() {
  cin >> h >> w;
  for (int i = 0; i < h; i++) {
    cin >> str;
    for (int j = 0; j < w; j++) {
      if (str[j] == '*') mt[i][j] = 1;
    }
  }
  bool found = false;
  for (int i = 1; i < h; i++) {
    for (int j = 1; j < w; j++) {
      if (mt[i][j]) {
        if (mt[i][j + 1] && mt[i - 1][j] && mt[i + 1][j] && mt[i][j - 1]) {
          found = true;
          int k = j - 1;
          while (k >= 0 && mt[i][k]) {
            mt[i][k] = 0;
            k--;
          }
          k = j + 1;
          while (k < w && mt[i][k]) {
            mt[i][k] = 0;
            k++;
          }
          k = i - 1;
          while (k >= 0 && mt[k][j]) {
            mt[k][j] = 0;
            k--;
          }
          k = i + 1;
          while (k < h && mt[k][j]) {
            mt[k][j] = 0;
            k++;
          }
          mt[i][j] = 0;
          break;
        }
      }
    }
    if (found) break;
  }
  if (!found) {
    cout << "NO";
    return;
  }
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++)
      if (mt[i][j]) {
        cout << "NO";
        return;
      }
  }
  cout << "YES";
}
void fastIO() {
  cin.sync_with_stdio(false);
  cin.tie(0);
}
void IO() {
  if (fopen("d:\\lmo.in", "r") != NULL) {
    freopen("d:\\lmo.in", "r", stdin);
  } else if (fopen("/media/Beijing/lmo.in", "r") != NULL) {
    freopen("/media/Beijing/lmo.in", "r", stdin);
  }
}
int main() {
  IO();
  fastIO();
  solve();
}

### Prompt

Develop a solution in cpp to the problem described below:

You have a given picture with size w × h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below:

  * A "+" shape has one center nonempty cell. 
  * There should be some (at least one) consecutive non-empty cells in each direction (left, right, up, down) from the center. In other words, there should be a ray in each direction. 
  * All other cells are empty. 



Find out if the given picture has single "+" shape.

Input

The first line contains two integers h and w (1 ≤ h, w ≤ 500) — the height and width of the picture.

The i-th of the next h lines contains string s_{i} of length w consisting "." and "*" where "." denotes the empty space and "*" denotes the non-empty space.

Output

If the given picture satisfies all conditions, print "YES". Otherwise, print "NO".

You can output each letter in any case (upper or lower).

Examples

Input


5 6
......
..*...
.****.
..*...
..*...


Output


YES


Input


3 5
..*..
****.
.*...


Output


NO


Input


7 7
.......
...*...
..****.
...*...
...*...
.......
.*.....


Output


NO


Input


5 6
..**..
..**..
******
..**..
..**..


Output


NO


Input


3 7
.*...*.
***.***
.*...*.


Output


NO


Input


5 10
..........
..*.......
.*.******.
..*.......
..........


Output


NO

Note

In the first example, the given picture contains one "+".

In the second example, two vertical branches are located in a different column.

In the third example, there is a dot outside of the shape.

In the fourth example, the width of the two vertical branches is 2.

In the fifth example, there are two shapes.

In the sixth example, there is an empty space inside of the shape.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e16 + 3;
const int mod = 1e9 + 7;
const int lim = 6e2 + 2;
int h, w;
int mt[lim][lim];
string str;
void solve() {
  cin >> h >> w;
  for (int i = 0; i < h; i++) {
    cin >> str;
    for (int j = 0; j < w; j++) {
      if (str[j] == '*') mt[i][j] = 1;
    }
  }
  bool found = false;
  for (int i = 1; i < h; i++) {
    for (int j = 1; j < w; j++) {
      if (mt[i][j]) {
        if (mt[i][j + 1] && mt[i - 1][j] && mt[i + 1][j] && mt[i][j - 1]) {
          found = true;
          int k = j - 1;
          while (k >= 0 && mt[i][k]) {
            mt[i][k] = 0;
            k--;
          }
          k = j + 1;
          while (k < w && mt[i][k]) {
            mt[i][k] = 0;
            k++;
          }
          k = i - 1;
          while (k >= 0 && mt[k][j]) {
            mt[k][j] = 0;
            k--;
          }
          k = i + 1;
          while (k < h && mt[k][j]) {
            mt[k][j] = 0;
            k++;
          }
          mt[i][j] = 0;
          break;
        }
      }
    }
    if (found) break;
  }
  if (!found) {
    cout << "NO";
    return;
  }
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++)
      if (mt[i][j]) {
        cout << "NO";
        return;
      }
  }
  cout << "YES";
}
void fastIO() {
  cin.sync_with_stdio(false);
  cin.tie(0);
}
void IO() {
  if (fopen("d:\\lmo.in", "r") != NULL) {
    freopen("d:\\lmo.in", "r", stdin);
  } else if (fopen("/media/Beijing/lmo.in", "r") != NULL) {
    freopen("/media/Beijing/lmo.in", "r", stdin);
  }
}
int main() {
  IO();
  fastIO();
  solve();
}

```