#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int INF = 1000000000;
const int mod = 1e9 + 7;
const int maxn = 8e5;
long long n, m;
int num[maxn];
int pos[maxn];
int maxx[maxn];
int minn[maxn];
int a[maxn];
int lowbit(int x) { return x & -x; }
void update(int x, int v) {
  while (x < maxn) {
    a[x] += v;
    x += lowbit(x);
  }
}
int sum(int x) {
  int ans = 0;
  while (x > 0) {
    ans += a[x];
    x -= lowbit(x);
  }
  return ans;
}
int main() {
  cin >> n >> m;
  int mid = maxn / 2;
  for (int i = 1; i <= m; i++) cin >> num[i];
  for (int i = 1; i <= n; i++) {
    maxx[i] = i;
    minn[i] = i;
    update(mid + i, 1);
    pos[i] = mid + i;
  }
  for (int i = 1; i <= m; i++) {
    maxx[num[i]] = max(maxx[num[i]], sum(pos[num[i]]));
    minn[num[i]] = 1;
    update(mid + 1 - i, 1);
    update(pos[num[i]], -1);
    pos[num[i]] = mid + 1 - i;
  }
  for (int i = 1; i <= n; i++) {
    maxx[i] = max(maxx[i], sum(pos[i]));
    cout << minn[i] << " " << maxx[i] << "\n";
  }
  return 0;
}
