


def breakingRecords(n, scores):
    high_score = scores[0]
    low_socre = scores[0]
    max_num = min_num = 0    
    
    for i in range(1, n):
        if scores[i] < low_socre:
            low_socre = scores[i]
            min_num += 1
        if high_score < scores[i]:
            high_score = scores[i]
            max_num += 1
            
    return [max_num, min_num]
    
n = 10
scores = [3, 4, 21, 36, 10, 28, 35, 5, 24, 42]
print(" ".join(map(str, breakingRecords(n, scores))))

#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'breakingRecords' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts INTEGER_ARRAY scores as parameter.
#
def breakingRecords(n, scores):
    high_score = scores[0]
    low_socre = scores[0]
    max_num = min_num = 0    
    
    for i in range(1, n):
        if scores[i] < low_socre:
            low_socre = scores[i]
            min_num += 1
        if high_score < scores[i]:
            high_score = scores[i]
            max_num += 1
            
    return [max_num, min_num]
if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    n = int(input().strip())
    scores = list(map(int, input().rstrip().split()))
    result = breakingRecords(n, scores)
    fptr.write(' '.join(map(str, result)))
    fptr.write('\n')
    fptr.close()
