#include #include #include using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) int main(void) { int n,m; cin>>n>>m; vector s(n); rep(i,n) { cin>>s[i]; rep(j,m-3) { if(s[i][j]=='L' && s[i][j+1]=='O' && s[i][j+2]=='V' && s[i][j+3]=='E') { cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }