#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int min = 0;
  int max = 0;
  vector<int> qw;
  vector<int> qw1;
  vector<int> qw2;
  cin >> n;
  qw.resize(n);
  qw1.resize(n);
  qw2.resize(n + 1);
  for (int i = 0; i < n; ++i) {
    qw[i] = 0;
    qw1[i] = 0;
  }
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    ++qw[a - 1];
  }
  if (n == 1) {
    if (qw[0] >= 3) {
      min = 1;
      max = 3;
    } else {
      if (qw[0] > 0) {
        min = 1;
        max = qw[0];
      } else {
        min = 0;
        max = 0;
      }
    }
  } else {
    if (n != 2) {
      qw1[n - 2] = qw[n - 1];
    }
    qw1[1] = qw[0];
    for (int i = 1; i < n - 1; ++i) {
      if (qw1[i - 1] > 0) {
        qw1[i - 1] += qw[i];
      } else {
        if (qw1[i] > 0) {
          qw1[i] += qw[i];
        } else {
          qw1[i + 1] += qw[i];
        }
      }
    }
    min = 0;
    for (int i = 0; i < n; ++i) {
      if (qw1[i] > 0) {
        min += 1;
      }
    }
    max = 0;
    if (qw[0] > 2) {
      max += 1;
      qw2[0] += 1;
      qw2[1] += 1;
    } else {
      if (qw[0] == 2) {
        max += 1;
        qw2[0] += 1;
      } else {
        if (qw[0] == 1) {
          max += 1;
        }
      }
    }
    for (int i = 1; i < n; ++i) {
      if (qw[i] > 2) {
        qw2[i + 1] += 1;
        qw2[i] += 1;
        qw2[i - 1] += 1;
      } else {
        if (qw[i] == 2) {
          if ((qw2[i - 1] == 0) && (qw2[i] == 0)) {
            qw2[i - 1] += 1;
            qw2[i] += 1;
          } else {
            if ((qw2[i - 1] == 0) && (qw2[i + 1] == 0)) {
              qw2[i - 1] += 1;
              qw2[i + 1] += 1;
            } else {
              if ((qw2[i] == 0) && (qw2[i + 1] == 0)) {
                qw2[i] += 1;
                qw2[i + 1] += 1;
              } else {
                qw2[i + 1] += 1;
                qw2[i] += 1;
                qw2[i - 1] += 1;
              }
            }
          }
        } else {
          if (qw[i] == 1) {
            if (qw2[i - 1] == 0) {
              qw2[i - 1] += 1;
            } else {
              if (qw2[i] == 0) {
                qw2[i] += 1;
              } else {
                qw2[i + 1] += 1;
              }
            }
          }
        }
      }
    }
    for (int i = 0; i < n + 1; ++i) {
      if (qw2[i] > 0) {
        max += 1;
      }
    }
  }
  cout << min << ' ' << max << endl;
  return 0;
}
