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