#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define Would #define you int main() { char k[55][55]; int a, b; cin >> a >> b; for (int i = 0; i < a; ++i) { for (int j = 0; j < b; ++j) { cin >> k[i][j]; } } for (int i = 0; i < a; ++i) { for (int j = 0; j < b - 4; ++j) { if (k[i][j] == 'L'&&k[i][j + 1] == 'O'&&k[i][j + 2] == 'V'&&k[i][j + 3] == 'E') { cout << "YES" << endl; return 0; } } } cout << "NO" << endl; }