problem

Given $ N $ different natural numbers $ a_i $. I decided to make a pair by choosing a different natural number from the given natural numbers. Output one pair that can be created with a value difference that is a multiple of $ N -1 $.

It should be noted that such a pair always exists.





Example

Input

5
1 2 4 7 10


Output

2 10
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<ll,ll> pint;

pint a[1001];
int main(){
    int n,ai;
    cin>>n;
    rep(i,n){
        cin>>ai;
        a[i]={ai%(n-1),ai};
    }
    sort(a,a+n);
    FOR(i,1,n){
        if(a[i].first==a[i-1].first){
            cout<<a[i].second<<" "<<a[i-1].second<<endl;
            return 0;
        }
    }
    return 0;
}
