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