import java.io.FileNotFoundException; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { new Main().run(); } void run() throws FileNotFoundException { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); String[] map = new String[n]; for (int i = 0; i < n; ++i) { map[i] = sc.next(); } for (int i = 0; i < n; ++i) { for (int j = 0; j + 4 <= map[i].length(); ++j) { if (map[i].substring(j, j + 4).equals("LOVE")) { System.out.println("YES"); return; } } } System.out.println("NO"); } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }