const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const [n, m] = lines.next().value .split(' ').map(x => Number(x)); for (let i = 0; i < n; i++) { if (lines.next().value.indexOf('LOVE') >= 0) { console.log('YES'); return; } } console.log('NO');