#include int main() { int n, m; scanf("%d%d",&n,&m); char s[51]; for (int i = 0;i < n;i++) { scanf("%s",&s); for (int j = 0;j < m - 3;j++) { if (s[j] == 'L' && s[j + 1] == 'O' && s[j + 2] == 'V' && s[j + 3] == 'E') { puts("YES"); return 0; } } } puts("NO"); }