#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
int last[N], a[N], f[N];
int mn[N], mx[N];
inline void update(int i, int x, int n) {
  while (i <= n) {
    f[i] += x;
    i += i & (-i);
  }
}
inline int query(int i) {
  int ret = 0;
  while (i) {
    ret += f[i];
    i &= (i - 1);
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(32);
  int n, m;
  cin >> n >> m;
  memset(last, 0, sizeof(last));
  memset(f, 0, sizeof(f));
  iota(mn + 1, mn + n + 1, 1);
  iota(mx + 1, mx + n + 1, 1);
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    if (last[a[i]]) {
      mx[a[i]] = max(mx[a[i]], query(i) - query(last[a[i]]) + 1);
      update(last[a[i]], -1, m);
    } else {
      mn[a[i]] = 1;
    }
    last[a[i]] = i;
    update(last[a[i]], 1, m);
  }
  for (int i = 1; i <= n; i++) {
    if (last[i]) {
      mx[i] = max(mx[i], query(m) - query(last[i]) + 1);
    }
  }
  memset(last, 0, sizeof(last));
  memset(f, 0, sizeof(f));
  for (int i = 1; i <= m; i++) {
    if (last[a[i]]) continue;
    last[a[i]] = i;
    mx[a[i]] = max(mx[a[i]], a[i] + query(n) - query(a[i]));
    update(a[i], 1, n);
  }
  for (int i = 1; i <= n; i++) {
    if (!last[i]) {
      mx[i] = max(mx[i], i + query(n) - query(i));
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << mn[i] << " " << mx[i] << '\n';
  }
  return 0;
}
