#include <bits/stdc++.h>
using namespace std;
const int N = 600 * 1000 + 13;
int f[N];
void upd(int first, int val) {
  for (int i = first; i >= 0; i = (i & (i + 1)) - 1) f[i] += val;
}
int get(int first) {
  int res = 0;
  for (int i = first; i < N; i |= i + 1) res += f[i];
  return res;
}
void solve() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<int> mn(n);
  iota(mn.begin(), mn.end(), 0);
  vector<int> mx = mn;
  vector<int> a(m);
  for (int i = 0; i < int(m); ++i) {
    scanf("%d", &a[i]);
    --a[i];
    mn[a[i]] = 0;
  }
  vector<int> pos(n);
  for (int i = 0; i < int(n); ++i) pos[i] = n - i - 1;
  for (int i = 0; i < int(n); ++i) upd(i, 1);
  for (int i = 0; i < int(m); ++i) {
    mx[a[i]] = max(mx[a[i]], get(pos[a[i]] + 1));
    upd(pos[a[i]], -1);
    pos[a[i]] = i + n;
    upd(pos[a[i]], 1);
  }
  for (int i = 0; i < int(n); ++i) {
    mx[i] = max(mx[i], get(pos[i] + 1));
  }
  for (int i = 0; i < int(n); ++i) printf("%d %d\n", mn[i] + 1, mx[i] + 1);
}
signed main() {
  int T = 1;
  while (T--) solve();
  return 0;
}
