#include <bits/stdc++.h>
using namespace std;

int main(){
   int n,num,maxn=1;
   cin >> n;
   for (int i = 0; i < n; i++){
        cin >> num;
   maxn = max(maxn,num);
   }
    n++;
    num = maxn - n;
    num /= 2;
    n = maxn - n;
    n /= 2;
     n++;
     cout << num << endl << n;

}
