/* -*- coding: utf-8 -*- * * 700.cc: No.700 LOVE - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_W = 64; /* typedef */ /* global variables */ char s[MAX_W]; /* subroutines */ /* main */ int main() { int h, w; scanf("%d%d", &h, &w); for (int y = 0; y < h; y++) { scanf("%s", s); for (int x = 0; x + 4 <= w; x++) if (s[x] == 'L' && s[x + 1] == 'O' && s[x + 2] == 'V' && s[x + 3] == 'E') { puts("YES"); return 0; } } puts("NO"); return 0; }