Jerome needs 1 gallon of paint in order to paint a bedroom ceiling that is shaped like a square and measures 12 feet on each side. How many gallons of paint would he need to paint a living room ceiling that is shaped like a square and each side measures 24 feet?