N, M = gets.split.map(&:to_i) S = N.times.map { gets.chomp } if S.any? { |s| s =~ /LOVE/ } puts 'YES' else puts 'NO' end