const reader = require('readline').createInterface({
    input: process.stdin,
});

let count = 0;
let lins = [];
let lineList = []
let AV;
let BW;
let T;
reader.on('line', (line) => {
  lineList.push(line);
  if (count === 0) { AV = line.split(' ') }
  if (count === 1) { BW = line.split(' ') }
  else {
    T = line
    if (AV[1] === BW[1]) { console.log('NO'); }
    else if (AV[1] < BW[1]) { console.log('NO'); }
    else { console.log('YES'); }

    process.exit(0);
  }
  count++
});
