#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int inf = 1e9 + 7;
constexpr ll longinf = 1LL << 60;
constexpr ll mod = 1e9 + 7;
template <typename T>
struct SegmentTree {
 private:
  int n;
  T E;
  vector<T> node;
  inline void updatef(T& x, T& y) { x = y; }
  inline T queryf(T& x, T& y) { return x + y; }

 public:
  SegmentTree(int sz, T E_) : E(E_) {
    n = 1;
    while (n < sz) n <<= 1;
    node.resize(2 * n - 1, E);
  }
  SegmentTree(vector<T>& A, T E_) : E(E_) {
    int sz = A.size();
    n = 1;
    while (n < sz) n <<= 1;
    node.resize(2 * n - 1, E);
    for (int i = (int)(0); i < (int)(sz); ++i) node[i + n - 1] = A[i];
    for (int i = n - 2; i >= 0; --i) {
      node[i] = queryf(node[2 * i + 1], node[2 * i + 2]);
    }
  }
  void update(int k, T x) {
    k += n - 1;
    updatef(node[k], x);
    while (k > 0) {
      k = (k - 1) / 2;
      node[k] = queryf(node[2 * k + 1], node[2 * k + 2]);
    }
  }
  T get(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    if (r <= a || b <= l) return E;
    if (a <= l && r <= b) return node[k];
    T xl = get(a, b, 2 * k + 1, l, (l + r) / 2);
    T xr = get(a, b, 2 * k + 2, (l + r) / 2, r);
    return queryf(xl, xr);
  }
};
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<int> a(n + m);
  for (int i = (int)(0); i < (int)(m); ++i) {
    cin >> a[m - i - 1];
    --a[m - i - 1];
  }
  for (int i = (int)(0); i < (int)(n); ++i) a[i + m] = i;
  SegmentTree<int> sg(n + m, 0);
  vector<int> pre(n, -1);
  vector<int> mi(n), ma(n);
  for (int i = (int)(0); i < (int)(n); ++i) mi[i] = i;
  for (int i = (int)(0); i < (int)(n + m); ++i) {
    ma[a[i]] = max(ma[a[i]], sg.get(pre[a[i]] + 1, i));
    if (pre[a[i]] != -1) sg.update(pre[a[i]], 0);
    sg.update(i, 1);
    pre[a[i]] = i;
    if (i < m) mi[a[i]] = 0;
  }
  for (int i = (int)(0); i < (int)(n); ++i)
    cout << mi[i] + 1 << " " << ma[i] + 1 << endl;
  return 0;
}
