#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for(int i = a; i < b; i++)

int main(){
    ll N; cin >> N;
    vector<ll> A(N);
    rep(i, 0, N) cin >> A[i];

    ll cnt = 0;
    rep(i, 1, N) if(A[i-1] >= A[i]) cnt++;
    cout << 1 + cnt << endl;
    cout << N << endl;
}
