#include using namespace std; typedef unsigned long long ul; typedef signed long long ll; ul over = 1000000007; int main(void) { cin.tie(0); ios::sync_with_stdio(false); cout << fixed; int h, w; cin >> h >> w; bool isb[h][w]; int cnt = 0; for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { char c; cin >> c; isb[i][j] = (c=='#' ? true : false); if (isb[i][j]) cnt++; } } if (cnt%2==1) {cout << "NO" << endl; return 0;} for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { if (i==0 && j==0) continue; int f_cnt = 0; bool hit[h][w]; for (int k = 0; k < h; ++k) { for (int l = 0; l < w; ++l) hit[k][l] = false; } for (int k = 0; k < h; ++k) { for (int l = 0; l < w; ++l) { if (hit[k][l]) continue; if (isb[k][l] && i+k