#include #include #include using namespace std; int main(void) { int n, m; cin >> n >> m; string s; bool ok = false; for (int i = 0; i < n; ++i) { cin >> s; if (s.find("LOVE") != std::string::npos) ok = true; } cout << (ok ? "YES" : "NO") << endl; return 0; }