#include using namespace std; int main(){ int n, m, i, j; cin >> n >> m; vector s(n + 1); string x; for( i = 0 ; i < n ; i = i + 1 ){ cin >> s.at(i); } for( i = 0 ; i < n ; i = i + 1 ){ for( j = 0 ; j < m - 3 ; j = j + 1 ){ x = s.at(i); if( x.substr(j, 4) == "LOVE" ){ cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }