#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int n;
	cin>>n;
	bool bl = false;
	vector<long long int>v;
	for(int i =1;i<=n;i++){
		int a;
		cin>>a;
		v.push_back(a);
	//	if(a==1)bl=true;
	}
	
	sort(v.begin(),v.end());
	
	cout<<abs(v[0]-v[1])<<' '<<abs(v[0]-v[n-1])<<endl;
	
	for(int i = 1 ; i<v.size()-1;i++){
		int mn = min(v[i]-v[i-1],v[i+1]-v[i]);
		int mx= max(v[n-1]-v[i],v[i]-v[0]);
		cout<<mn<<' '<<mx<<endl;
	}
	
	cout<<v[n-1]-v[n-2]<<' '<<v[n-1]-v[0]<<endl;
	

	return 0;
}