using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var n = int.Parse(line[0]); var m = int.Parse(line[1]); if (m < 4) { Console.WriteLine("NO"); goto end; } for (int i = 0; i < n; i++) { var s = Console.ReadLine().Trim(); if (s.IndexOf("LOVE") != -1) { Console.WriteLine("YES"); goto end; } } Console.WriteLine("NO"); end:; } }