#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> p) {
  return os << '(' << p.first << ',' << p.second << ')';
}
void init();
void solve();
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  init();
  while (T--) {
    solve();
    cout << '\n';
  }
  return 0;
}
void init() {}
inline int qry(vector<int> &fw, int idx) {
  int res = 0;
  while (idx > 0) {
    res += fw[idx];
    idx -= (-idx & idx);
  }
  return res;
}
inline void upd(vector<int> &fw, int idx, int val, int maxidx) {
  while (idx <= maxidx) {
    fw[idx] += val;
    idx += (-idx & idx);
  }
}
void solve() {
  int n, m;
  cin >> n >> m;
  vector<int> fw(n + m + 1), li(n), mx(n), mn(n);
  for (int i = 1, idx; i <= n; i++) {
    mx[n - i] = mn[n - i] = n - i + 1;
    li[n - i] = idx = i;
    upd(fw, idx, 1, m + n);
  };
  for (int i = 0, idx, inp, mxc; i < m; i++) {
    cin >> inp;
    inp--;
    mn[inp] = 1;
    idx = li[inp];
    mxc = n - qry(fw, idx) + 1;
    ;
    mx[inp] = max(mxc, mx[inp]);
    idx = li[inp];
    upd(fw, idx, -1, m + n);
    li[inp] = idx = i + n + 1;
    upd(fw, idx, 1, m + n);
    ;
  }
  for (int inp = 0, idx, mxc; inp < n; inp++) {
    idx = li[inp];
    mxc = n - qry(fw, idx) + 1;
    ;
    mx[inp] = max(mxc, mx[inp]);
  }
  for (int i = 0; i < n; i++) {
    cout << mn[i] << ' ' << mx[i] << '\n';
  }
}
