#include <bits/stdc++.h>
using namespace std;
const long long oo = 999999999999999999;
struct Node {
  long long cor;
  long num;
  bool operator<(const Node in) const { return cor < in.cor; }
} s[1000000];
long long min0[1000000];
long long max0[1000000];
long long n;
long long l = oo, r = -oo, lp, rp;
int main() {
  cin >> n;
  s[0].cor = oo;
  s[n + 1].cor = oo;
  for (int i = 1; i <= n; i++) cin >> s[i].cor, s[i].num = i;
  sort(s + 1, s + n + 1);
  for (int i = 1; i <= n; i++) {
    if (l > s[i].cor) l = s[i].cor, lp = i;
    if (r < s[i].cor) r = s[i].cor, rp = i;
  }
  for (int i = 1; i <= n; i++) {
    min0[s[i].num] =
        min(abs(s[i].cor - s[i - 1].cor), abs(s[i].cor - s[i + 1].cor));
    max0[s[i].num] = max(abs(s[i].cor - s[lp].cor), abs(s[i].cor - s[rp].cor));
  }
  for (int i = 1; i <= n; i++) cout << min0[i] << " " << max0[i] << endl;
}
