using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int n = int.Parse(input[0]); int m = int.Parse(input[1]); string str = ""; bool flg = false; for (int i = 0; i < n; i++) { str = Console.ReadLine(); for(int j=0;j<str.Length-3;j++) { string temp = str.Substring(j, 4); if(temp=="LOVE") { Console.WriteLine("YES"); flg = true; break; } } if(flg==true) { break; } } if(flg==false) { Console.WriteLine("NO"); } } } }