#include <bits/stdc++.h>
using namespace std;
const int maxn = 300010;
const int INF = 2000000010;
int n, m, k;
int mi[maxn], ma[maxn], a[maxn], sum[maxn], v[maxn], la[maxn];
vector<pair<int, int>> G;
void add(int x, int cnt) {
  for (int i = x; i <= max(n, m); i += (i & -i)) {
    sum[i] += cnt;
  }
}
int get_sum(int x) {
  int ans = 0;
  for (int i = x; i >= 1; i -= (i & -i)) {
    ans += sum[i];
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) mi[i] = ma[i] = i;
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) {
    if (!v[a[i]])
      ma[a[i]] = max(ma[a[i]], a[i] + get_sum(n) - get_sum(a[i])), add(a[i], 1);
    else
      G.push_back(make_pair(v[a[i]], i));
    la[i] = v[a[i]] + 1;
    v[a[i]] = i;
    mi[a[i]] = 1;
  }
  for (int i = 1; i <= n; i++) {
    if (!v[i]) {
      int x = get_sum(n) - get_sum(i);
      ma[i] = max(ma[i], i + x);
    }
  }
  for (int i = 1; i <= max(n, m); i++) sum[i] = 0;
  k = 0;
  for (int i = 0; i < (int)G.size(); i++) {
    while (k < G[i].second) {
      ++k;
      add(la[k], 1);
      add(k + 1, -1);
    }
    int x = get_sum(G[i].first);
    ma[a[G[i].first]] = max(ma[a[G[i].first]], x);
  }
  while (k < m) {
    ++k;
    add(la[k], 1);
    add(k + 1, -1);
  }
  for (int i = 1; i <= n; i++) {
    if (v[i] > 0) {
      int x = get_sum(v[i]);
      ma[i] = max(ma[i], x);
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d %d\n", mi[i], ma[i]);
  }
  return 0;
}
