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