input: Write a python function to calculate the coefficients of the least squares linear regression line.
  assert least_squares(np.array([1, 2, 3, 4, 5, 6]), np.array([3, 4, 5, 6, 7, 8])) == (1.0, 2.0)
  assert least_squares(np.array([1, 2, 3]), np.array([2, 3, 4])) == (1.0, 1.0)
  assert least_squares(np.array([0, 1, 2, 3]), np.array([1, 2, 3, 4])) == (1.0, 1.0)
output: import numpy as np
  
  def least_squares(x, y):
      n = len(x)
      sum_x = np.sum(x)
      sum_y = np.sum(y)
      sum_xy = np.sum(x * y)
      sum_xx = np.sum(x * x)
      
      slope = (n * sum_xy - sum_x * sum_y) / (n * sum_xx - sum_x ** 2)
      intercept = (sum_y - slope * sum_x) / n
      
      return intercept, slope