class Array def sort? self == self.sort end end puts gets.split.map!(&:to_i).sort? ? 'Yes' : 'No'