a=[] [gets,gets].each{|e|a+=e.scan(/([0-9]+)\.([0-9]+)\.([0-9]+)/)} a.map!{|e|e.map(&:to_i)} puts a[0][0]*1000000+a[0][1]*1000+a[0][2] >= a[1][0]*1000000+a[1][1]*1000+a[1][2] ? "YES" : "NO"