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