#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, an;
int a[5010], f[1000010][6], ff[5010];
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++) {
      k = a[j] - a[i];
      if (*f[k] <= m) f[k][++*f[k]] = i;
    }
  for (an = 1;; an++) {
    int s = 0;
    for (j = an; j < a[n]; j += an)
      for (k = 1; k <= *f[j]; k++)
        if (ff[f[j][k]] != an) {
          ff[f[j][k]] = an;
          s++;
          if (s > m) goto yy1;
        }
    break;
  yy1:;
  }
  printf("%d\n", an);
  return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

You have been given n distinct integers a1, a2, ..., an. You can remove at most k of them. Find the minimum modular m (m > 0), so that for every pair of the remaining integers (ai, aj), the following unequality holds: <image>.

Input

The first line contains two integers n and k (1 ≤ n ≤ 5000, 0 ≤ k ≤ 4), which we have mentioned above. 

The second line contains n distinct integers a1, a2, ..., an (0 ≤ ai ≤ 106).

Output

Print a single positive integer — the minimum m.

Examples

Input

7 0
0 2 3 6 7 12 18


Output

13


Input

7 1
0 2 3 6 7 12 18


Output

7

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, an;
int a[5010], f[1000010][6], ff[5010];
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++) {
      k = a[j] - a[i];
      if (*f[k] <= m) f[k][++*f[k]] = i;
    }
  for (an = 1;; an++) {
    int s = 0;
    for (j = an; j < a[n]; j += an)
      for (k = 1; k <= *f[j]; k++)
        if (ff[f[j][k]] != an) {
          ff[f[j][k]] = an;
          s++;
          if (s > m) goto yy1;
        }
    break;
  yy1:;
  }
  printf("%d\n", an);
  return 0;
}

```