#include <bits/stdc++.h>
int t[2400032];
using namespace std;
void update(int v, int tl, int tr, int pos, int new_val) {
  if (tl == tr) {
    t[v] = new_val;
  } else {
    int tm = (tl + tr) / 2;
    if (pos <= tm)
      update(v * 2, tl, tm, pos, new_val);
    else
      update(v * 2 + 1, tm + 1, tr, pos, new_val);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
int sum(int v, int tl, int tr, int l, int r) {
  if (l > r) return 0;
  if (l == tl && r == tr) {
    return t[v];
  }
  int tm = (tl + tr) / 2;
  return sum(v * 2, tl, tm, l, min(r, tm)) +
         sum(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r);
}
int curr;
int n, m, a;
vector<int> hol;
vector<pair<int, int>> p;
int main() {
  cin >> n >> m;
  hol.resize(n);
  p.resize(n);
  for (int i = 0; i < n; i++) {
    update(1, 0, n + m + 8, i + m + 1, 1);
    hol[i] = i + m + 1;
    p[i].first = i + 1;
    p[i].second = i + 1;
  }
  for (int i = m; i > 0; i--) {
    cin >> a;
    p[a - 1].second =
        max(p[a - 1].second, sum(1, 0, n + m + 8, 0, hol[a - 1] - 1) + 1);
    update(1, 0, n + m + 8, hol[a - 1], 0);
    update(1, 0, n + m + 8, i, 1);
    hol[a - 1] = i;
    p[a - 1].first = 1;
  }
  for (int i = 0; i < n; i++) {
    p[i].second = max(p[i].second, sum(1, 0, n + m + 8, 0, hol[i] - 1) + 1);
  }
  for (int i = 0; i < n; i++) {
    cout << p[i].first << ' ' << p[i].second << '\n';
  }
  return 0;
}
