package main import ( "bufio" "fmt" "os" "strconv" "strings" ) var sc = bufio.NewScanner(os.Stdin) func main() { ss := strings.Split(nextLine(), " ") row, _ := strconv.Atoi(ss[0]) //length, _ := strconv.Atoi(ss[1]) for i := 0; i < row; i++ { s := nextLine() if strings.Index(s, "LOVE") >= 0 { success() os.Exit(0) } } fail() } func nextLine() string { var s string if sc.Scan() { s = sc.Text() } return s } func success() { fmt.Println("YES") } func fail() { fmt.Println("NO") }