// yukicoder: No. 700 LOVE
// 2019.5.1 bal4u

#include <stdio.h>
#include <string.h>

char s[55];
char *a = "LOVE";

int main()
{
	int r, c, n, m;
	
	scanf("%d%d", &n, &m);
	for (r = 0; r < n; r++) {
		scanf("%s", s);
		for (c = 3; c < m; c++) {
			if (memcmp(s+c-3, a, 4) == 0) {
				puts("YES");
				return 0;
			}
		}
	}
	puts("NO");
	return 0;
}