using System.Globalization; public class Program { public static void Main() { //int num = int.Parse(Console.ReadLine() ?? string.Empty); string[] str = (Console.ReadLine() ?? string.Empty).Trim().Split(' '); //string str = Console.ReadLine() ?? string.Empty; bool h = false; for (int i = 0; i < int.Parse(str[0]); i++) { string st = Console.ReadLine() ?? string.Empty; if (!h) { h = st.Contains("LOVE"); } } if (h) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }