#1902. 等差数列

等差数列

当前没有测试数据。

Background

Special for beginners, ^_^

Description

给定 n 个自然数 a1,a2,...,ana_1, a_2, ..., a_n,请你选出一些数,使得它们可以组成一个等差数列。

请问最多可以选出多少个数?

Format

Input

本题每个测试点包含不多于10组测试数据。

对于每组数据包含两行,

第一行:一个正整数 n (104\le10^4)。

第二行:n 个自然数 a1,a2,...,an109a_1, a_2, ..., a_n(\le 10^9)

Output

每行输出一个整数,表示所求答案。

Samples

5
1 2 3 4 5 
6
0 2 3 5 6 9
5
4

Limitation

1s, 1024KiB for each test case.