#include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; char c[51]; int b = 0; for (int i = 0; i < n; i++) { cin >> c; if (strstr(c, "LOVE")) b = 1; } cout << (b ? "YES" : "NO") << endl; return 0; }