#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("trapv")
#pragma GCC target("sse4")
using namespace std;
long long nCr(long long n, long long r) {
  long double res = 1;
  r = min(r, n - r);
  for (long long i = 1; i <= r; i++) {
    res = res * (n - r + i) / i;
  }
  return (long long)(res + 0.01);
}
long long modpow(long long x, long long y, long long m) {
  x %= m;
  long long res = 1LL;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % m;
    }
    x = (x * x) % m;
    y >>= 1;
  }
  return res;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> x(n);
  for (auto &ele : x) {
    cin >> ele;
  }
  sort(x.begin(), x.end());
  for (long long i = 0; i < n; i++) {
    if (i == 0) {
      long long mn = abs(x[i] - x[i + 1]);
      long long mx = abs(x[i] - x[n - 1]);
      cout << mn << " " << mx << "\n";
    } else if (i == n - 1) {
      long long mn = abs(x[i] - x[n - 2]);
      long long mx = abs(x[i] - x[0]);
      cout << mn << " " << mx << "\n";
    } else {
      long long mn = min(abs(x[i] - x[i - 1]), abs(x[i] - x[i + 1]));
      long long mx = max(abs(x[i] - x[0]), abs(x[i] - x[n - 1]));
      cout << mn << " " << mx << "\n";
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
