#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<set>
#include<stdio.h>
#include<ctype.h>
using namespace std;
int main()
{
	int n;
	cin >> n;
	vector < long long  int > a(n);
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	long long int ans = 1;
	for (int i = 1; i < n; i++)
	{
		if (a[i - 1] >= a[i])
		{
			ans++;
		}
	}
	cout << ans << endl << n << endl;
}

