input: Write a python function to perform simple linear regression using numpy and return the slope and intercept of the line.
  assert linear_regression([1, 2, 3, 4, 5], [2, 4, 5, 4, 5]) == (0.6, 2.2)
  assert linear_regression([1, 2, 3, 4, 5], [3, 6, 7, 8, 9]) == (1.4, 1.4)
  assert linear_regression([1, 2, 3, 4], [1, 2, 3, 4]) == (1.0, 0.0)
output: import numpy as np
  
  def linear_regression(x, y):
      x = np.array(x)
      y = np.array(y)
      
      n = len(x)
      xy = x * y
      x_squared = x ** 2
      
      slope = (n * np.sum(xy) - np.sum(x) * np.sum(y)) / (n * np.sum(x_squared) - np.sum(x) ** 2)
      intercept = (np.sum(y) - slope * np.sum(x)) / n
      
      return slope, intercept