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
#include <bits/stdc++.h>
using namespace std;
int n, m, mmax, s[5005], f[1000005], smax;
bool flag[1000005];
int comp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int calcans(void) {
  int ans, i, j, same;
  for (ans = 1;; ans++) {
    for (i = ans, same = 0; i <= smax; i += ans) {
      same += f[i];
      if (same > mmax) break;
    }
    if (same > mmax) continue;
    for (i = same = 0; i < n; i++) {
      if (!flag[s[i] % ans])
        flag[s[i] % ans] = true;
      else
        same++;
      if (same > m) break;
    }
    if (same <= m) return ans;
    for (j = 0; j < i; j++) flag[s[j] % ans] = false;
  }
}
int main() {
  int i, j;
  scanf("%d%d", &n, &m);
  mmax = (m + 1) * m / 2;
  memset(f, 0, sizeof(f));
  memset(flag, 0, sizeof(flag));
  for (i = 0; i < n; i++) scanf("%d", &s[i]);
  qsort(s, n, sizeof(int), comp);
  smax = s[n - 1] - s[0];
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++) f[s[j] - s[i]]++;
  printf("%d\n", calcans());
  return 0;
}
