#include <bits/stdc++.h>
using namespace std;
const int maxn = 6e5 + 10;
const int mod = 1000000000 + 7;
const double eps = 1e-6;
int n, m, num, N, c[maxn], maxi[maxn], mini[maxn], pos[maxn];
int ask(int x) {
  int ans = 0;
  for (; x; x -= (x & -x)) ans += c[x];
  return ans;
}
void add(int x, int y) {
  for (; x <= N; x += (x & -x)) c[x] += y;
}
int main() {
  cin >> n >> m;
  N = n + m;
  for (int i = 1; i <= n; i++) {
    pos[i] = m + i;
    add(m + i, 1);
    mini[i] = i;
    maxi[i] = i;
  }
  for (int i = 1; i <= m; i++) {
    cin >> num;
    mini[num] = 1;
    maxi[num] = max(maxi[num], ask(pos[num]));
    add(pos[num], -1);
    pos[num] = m - i + 1;
    add(m - i + 1, 1);
  }
  for (int i = 1; i <= n; i++) {
    maxi[i] = max(maxi[i], ask(pos[i]));
  }
  for (int i = 1; i <= n; i++) {
    cout << mini[i] << " " << maxi[i] << endl;
  }
  return 0;
}
