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