#include using namespace std; const string LOVE = "LOVE"; int main() { int n, m; string s; bool ok = false; cin >> n >> m; while (n--) { cin >> s; ok |= (s.find(LOVE) != string::npos); } cout << (ok ? "YES" : "NO") << endl; return 0; }