Questionnaire

서로 다른 정수들이 주어질 때, 절반 이상이 같은 나머지 k를 갖도록 하는 m과 k를 찾는다.

보통6수학정수론조합론그리디아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

In order to get better results in official ACM ICPC contests, the team leader came up with a questionnaire. He asked every participant whether they want to have more training.

Obviously, many people don't want more training, so the clever leader didn't write down their words such as "Yes" or "No". Instead, he let everyone choose a positive integer a_ia\_i to represent their opinion. Amazingly, all the resulting numbers were distinct.

Now the leader wants to choose a pair of positive intergers mm (1<m1091 < m \le 10^9) and kk (0k<m0 \le k < m), and regard those people whose number is exactly kk modulo mm as "Yes",  and all others as "No". If there are at least as many "Yes" answers as "No" answers, the leader can have a chance to offer more training.

Please help the team leader to find such pair of mm and kk.

입력

The first line of the input contains an integer nn: the number of ACM ICPC participants (3n1053 \leq n \leq 10^5).

The next line contains nn distinct integers a_1a\_1, a_2a\_2, \ldots, a_na\_n: the numbers chosen by the participants (1a_i1091 \leq a\_i \leq 10^9).

출력

Print a single line containing two integers mm and kk. If there are several possible solutions, print any one of them.