#include #include #include #include #include using namespace std; int main() { //int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0; long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0; //cout << LONG_MAX << endl; //string s[1001]; char x[10000]; cin >> a; cin >> b; for (c = 0; c < a*b; c++) { cin >> x[c]; } for (c = 0; c < a*b - 3; c++) { if (x[c] == 'L'&&x[c + 1] == 'O'&&x[c + 2] == 'V'&&x[c + 3] == 'E') { cout << "YES" << endl; return 0; } } cout << "NO" << endl; //cout << ans << endl; return 0; }