class Rectangle
    attr_accessor :x,:y
    def initialize(x,y)
        self.x = x
        self.y = y
    end
    def calculate_area
        return self.x*self.y
    end
    def calculate_parameter
        return 2*self.x+2*self.y
    end
end

nums = gets.split.map(&:to_i)
rec = Rectangle.new(*nums)
puts("#{rec.calculate_area} #{rec.calculate_parameter}")
