using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { var nm = ReadLine().Split().Select(int.Parse).ToArray(); for (int i = 0; i < nm[0]; i++) { var line = ReadLine(); for (int j = 0; j < nm[1] - 4; j++) { if (line.Substring(j, 4) == "LOVE") { WriteLine("YES"); return; } } } WriteLine("NO"); } }