#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; string s, t = "LOVE"; while(n--) { cin >> s; for(int i = 0; i <= m - 4; i++) { if(s.substr(i, 4) == t) { cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }