#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18 + 1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i;
  }
  sort(v.begin(), v.end());
  vector<pair<int, int> > min_max(n);
  long long int my_x, near_l, near_r, far_l = v[0].first,
                                      far_r = v[n - 1].first, near, far;
  for (int i = 0; i < n; i++) {
    my_x = v[i].first;
    if (i != 0)
      near_l = v[i - 1].first;
    else
      near_l = INF;
    if (i != n - 1)
      near_r = v[i + 1].first;
    else
      near_r = INF;
    near = min(abs(near_l - my_x), abs(near_r - my_x));
    far = max(abs(my_x - far_l), abs(my_x - far_r));
    min_max[v[i].second] = {near, far};
  }
  for (int i = 0; i < n; i++)
    cout << min_max[i].first << " " << min_max[i].second << endl;
  return 0;
}
