#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <queue>
#include <bitset>
#include <set>

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll INF = 1000000000000000000LL;
using namespace std;

const int MOD = 1000000007;

int main(){
    ll N;
    cin >> N;
    vector <ll> a(N);
    REP(i,N)
    {
        cin >> a[i];
    }

    int now = a[0];
    int res = 1;
    for(int i = 1; i < N; ++i)
    {
        if(now >= a[i])++res;

        now = a[i];
    }
    cout << res << endl;
    cout << N << endl;


    return 0;
}


