6102: Minimum Modular

内存限制:256 MB 时间限制:2 S
题面:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述

time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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: .

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