#include using namespace std; string mat[111]; int main(){ int H, W; cin >> H >> W; for(int y=0;y> mat[y]; int top = 111, bot = -1, lef = 111, rig = -1; int tot = 0; for(int y=0;y= 3 && bot - top >= 1 && rig - lef >= 1){ int cnt = (bot - top + 1) * 2 + (rig - lef + 1) * 2 - 4; if(cnt == tot){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }