readlines.each do |str| if /LOVE/.match(str) puts "YES" exit end end puts "NO"