#include using namespace std; int main() { int N, M; cin >> N >> M; for (int i = 0; i < N; i++) { string S; cin >> S; for (int j = 0; j < N; j++) { if (S.substr(j, 4) == "LOVE") { cout << "YES" << "\n"; return 0; } } } cout << "NO" << "\n"; }