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