input: Write a python function to find the maximum product of two numbers in an array such that the product is less than a given number.
  assert max_product([1, 2, 3, 4, 5], 20) == 15
  assert max_product([10, 20, 30, 40], 1000) == 800
  assert max_product([1, 2, 3], 4) == 2
output: def max_product(arr, limit):
      max_prod = -1
      n = len(arr)
      for i in range(n):
          for j in range(i + 1, n):
              product = arr[i] * arr[j]
              if product < limit and product > max_prod:
                  max_prod = product
      return max_prod