#include <iostream>
using namespace std;
int b[10000000];
int main()
{
	int a;
	cin >> a;
	int c = a;
	for (int i = 0; i < a; i++) {
		cin >> b[i];
		if (i > 0)if (b[i] > b[i - 1]) {
			c -= 1;
		}
	}
	cout << c << endl<< a << endl;
}

