fossil_ver = gets.split('.').map(&:to_i) ver = gets.split('.').map(&:to_i) p fossil_ver, ver puts (0..2).inject(true){ |bool, i| bool && (fossil_ver[i] >= ver[i]) } ? 'YES' : 'NO'