#include #include using namespace std; int main() { int n, m; cin >> n >> m; if (m < 4) { cout << "NO" << endl; return 0; } while (n--){ string s; cin >> s; for (int i = 0; i + 3 < m; ++i){ if (s[i] == 'L' and s[i + 1] == 'O' and s[i + 2] == 'V' and s[i + 3] == 'E'){ cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }