input: Write a function to create a Linear Regression model in Python that can predict housing prices based on the living area and number of rooms. The function should take a list of input data, fit the model, and return the prediction for a given living area and number of rooms. If the input data is empty, the function should return None.
  assert predict_housing_price([[2000, 3], [1600, 2.5], [2400, 3.5], [1400, 2], [3000, 4]], [75000, 43000, 59000, 32000, 85000], [2200, 3])==55000.0
  assert predict_housing_price([], [], [2200, 3])==None
  assert predict_housing_price([[2000, 3], [1600, 2.5], [2400, 3.5], [1400, 2], [3000, 4]], [75000, 43000, 59000, 32000, 85000], [1800, 2.5])==43000.0
  assert predict_housing_price([[1200, 2], [1400, 3]], [30000, 40000], [1300, 2.5])==35000.0
  assert predict_housing_price([[1200, 2], [1400, 3]], [30000, 40000], [1300, 2])==30000.0
output: def predict_housing_price(input_data, prices, query):
      if not input_data:
          return None
      X = [[1] + row for row in input_data]
      y = prices
      X_query = [1] + query
      X_transpose = list(zip(*X))
      X_transpose_X = [[sum(a * b for a, b in zip(X_col, X_row)) for X_col in X_transpose] for X_row in X]
      X_transpose_X_inv = [[1 / (X_transpose_X[0][0] * X_transpose_X[1][1] - X_transpose_X[0][1] * X_transpose_X[1][0]) * X_transpose_X[1][1], -1 / (X_transpose_X[0][0] * X_transpose_X[1][1] - X_transpose_X[0][1] * X_transpose_X[1][0]) * X_transpose_X[0][1]],
                       [-1 / (X_transpose_X[0][0] * X_transpose_X[1][1] - X_transpose_X[0][1] * X_transpose_X[1][0]) * X_transpose_X[1][0], 1 / (X_transpose_X[0][0] * X_transpose_X[1][1] - X_transpose_X[0][1] * X_transpose_X[1][0]) * X_transpose_X[0][0]]]
      X_transpose_X_inv_X_transpose = [[sum(a * b for a, b in zip(X_transpose_X_inv_row, X_transpose_col)) for X_transpose_col in X_transpose] for X_transpose_X_inv_row in X_transpose_X_inv]
      beta = [sum(a * b for a, b in zip(X_transpose_X_inv_X_transpose_row, y)) for X_transpose_X_inv_X_transpose_row in X_transpose_X_inv_X_transpose]
      return sum(a * b for a, b in zip(beta, X_query))