puts gets.split.max {|a,b| a.tr("47","74").to_i <=> b.tr("47","74").to_i }