use std::io::*; use std::str::FromStr; use utils::*; pub fn main() { let i = stdin(); let mut o = Vec::new(); run(i.lock(), &mut o); stdout().write_all(&o).unwrap(); } fn run(i: R, o: &mut W) { let mut i = CpReader::new(i); let (n, _) = i.read2::(); let mut r = "NO"; for _ in 0..n { if i.read_line().find("LOVE").is_some() { r = "YES"; break; } } writeln!(o, "{}", r).unwrap(); } mod utils { use super::*; pub struct CpReader { r: R, s: String, } macro_rules! fn_read { {$f:ident($($v:ident: $t:ident),*)} => { pub fn $f<$($t: FromStr),*>(&mut self) -> ($($t),*) { let i = &mut self.read_line().split(' '); $( let $v = i.next().unwrap().parse().ok().unwrap(); )* ($($v),*) } }; } impl CpReader { pub fn new(r: R) -> Self { CpReader { r: r, s: String::new(), } } pub fn read_line(&mut self) -> &str { self.s.clear(); self.r.read_line(&mut self.s).unwrap(); self.s.trim() } fn_read! { read2(v1: T1, v2: T2) } } }