Cute Rabbit
题号:NC244827
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

What a cute rabbit ! BaiQian has n white rabbits , and the rabbit has a cute value of a_ i . Now Sister Bai Qian will paint these rabbits . Some rabbits are painted green , and the rest are still white . (Please note that you can't painted all rabbits green)

Now , BaiQian uses the numbers on each white rabbit to find the remainder of the numbers on the green rabbits . Suppose that there are A green rabbits and B white rabbits (obviously: , then remainder results will be obtained . If these remainder results are all the same , it indicates that this is a good coloring scheme .

BaiQian wants to know that among all the good coloring schemes , there can be at most how many green rabbits . If there is no good painting scheme , output 0 .

输入描述:

The first line contains one integers n . As described in the statement . 

Then the second line contains n integers a_1,a_2,...,a_n .

输出描述:

Output an integer in a single line , indicates the answer .
示例1

输入

复制
5
4 10 14 4 4

输出

复制
3

说明

In the first sample , paint the first, fourth and fifth rabbits green, so that each white rabbit can get a result of 2 from the green rabbit.
示例2

输入

复制
3
4 10 16

输出

复制
2