#include <bits/stdc++.h>
using namespace std;
inline int qr() {
  int f = 0, fu = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fu = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    f = (f << 3) + (f << 1) + c - 48;
    c = getchar();
  }
  return f * fu;
}
const int N = 3e5 + 10;
int c[N << 1], n, m, loc[N], ans[N][2], h;
int get_sum(int k) {
  int ans = 0;
  while (k > 0) {
    ans += c[k];
    k -= ((k) & (-(k)));
  }
  return ans;
}
void add(int t, int v) {
  while (t <= n + m) {
    c[t] += v;
    t += ((t) & (-(t)));
  }
}
int main() {
  n = qr(), m = qr();
  h = m + 1;
  for (register int i = 1; i <= n; ++i)
    add(m + i, 1), loc[i] = m + i, ans[i][0] = i;
  for (register int i = 1; i <= m; ++i) {
    int x = qr();
    ans[x][0] = 1, ans[x][1] = max(ans[x][1], get_sum(loc[x]));
    add(loc[x], -1), add(--h, 1), loc[x] = h;
  }
  for (register int i = 1; i <= n; ++i)
    printf("%d %d\n", ans[i][0], max(ans[i][1], get_sum(loc[i])));
  return 0;
}
