#include using namespace std; // not.. bool F(vector s){ int h=s.size(); int w=s[0].size(); if(s==vector(h,string(w,'.'))) return false; for(int i=0;i t=s; for(int y=0;y> h >> w; vector s(h); for(int i=0;i> s[i]; vector t=s; reverse(t.begin(),t.end()); if(F(s) || F(t)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }