#include<stdio.h>
#include<iostream>
using namespace std;

int n,m;
int main (){
   cin >> n >> m;
   for(int i=0; i<n; i++) {
        string s;
        cin >> s;
        for(int j=0; j<m-4; 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;
}