#include // #include using namespace std; // using bigint = boost::multiprecision::cpp_int; template using min_priority_queue = priority_queue,greater>; random_device seed_gen; mt19937 engine(seed_gen()); int64_t get_time_ns(){ struct::timespec t; clock_gettime(CLOCK_MONOTONIC, &t); return t.tv_sec * int64_t(1'000'000'000) + t.tv_nsec; } bool solve() { int h, w; cin >> h >> w; vector S(h); for(auto &s : S) cin >> s; for(int i = 0; i < h; i++) { for(int j = 0; j <= w-4; j++) { if(S[i].substr(j, 4) == "LOVE") return 1; } } return 0; } int main() { bool ans = solve(); if(ans) cout << "YES" << endl; else cout << "NO" << endl; }