// #define _GLIBCXX_DEBUG #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input int n, m; cin >> n >> m; vector s(n); rep(i, n) cin >> s[i]; // Output bool ok = false; rep(i, n) rep(j, m) if (s[i].substr(j, 4) == "LOVE") ok = true; cout << (ok ? "YES" : "NO") << endl; }