#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU x, y = readlines.map{|x| x.split('.').map(&:to_i)} puts ((y <=> x) < 0 ? 'YES' : 'NO')