#include #define FOR(i,y) for(int i=0;i>n>>m; FOR(i,n){ string s;cin>>s; FOR(j,m-3){ if(s.substr(j,4)=="LOVE")puts("YES"); } } puts("NO"); }