#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>n>>m){ string s[51]; string ans="NO"; REP(i,0,n){ cin>>s[i]; } REP(i,0,n) { REP(j, 0, m - 3) { if (s[i].substr(j, 4) == "LOVE") { ans="YES"; } } } p(ans); } return 0; }