#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the breakingRecords function below.
def breakingRecords(scores):
    mincnt=0
    maxcnt=0
    max=scores[0]
    min=scores[0]
    for i in range(0, len(scores)):
        if(scores[i]>max):
            maxcnt=maxcnt+1
            max=scores[i]
        if(scores[i]<min):
            mincnt=mincnt+1
            min=scores[i]

    return maxcnt,mincnt

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input())

    scores = list(map(int, input().rstrip().split()))

    result = breakingRecords(scores)

    fptr.write(' '.join(map(str, result)))
    fptr.write('\n')

    fptr.close()

0f94aa8aa1d4f7ed0442ab69f1d31141004e0d78
<mask token>

<mask token>


def breakingRecords(scores):
    mincnt = 0
    maxcnt = 0
    max = scores[0]
    min = scores[0]
    for i in range(0, len(scores)):
        if scores[i] > max:
            maxcnt = maxcnt + 1
            max = scores[i]
        if scores[i] < min:
            mincnt = mincnt + 1
            min = scores[i]
    return maxcnt, mincnt


<mask token>

<mask token>


def breakingRecords(scores):
    mincnt = 0
    maxcnt = 0
    max = scores[0]
    min = scores[0]
    for i in range(0, len(scores)):
        if scores[i] > max:
            maxcnt = maxcnt + 1
            max = scores[i]
        if scores[i] < min:
            mincnt = mincnt + 1
            min = scores[i]
    return maxcnt, mincnt


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    n = int(input())
    scores = list(map(int, input().rstrip().split()))
    result = breakingRecords(scores)
    fptr.write(' '.join(map(str, result)))
    fptr.write('\n')
    fptr.close()

import math
import os
import random
import re
import sys


def breakingRecords(scores):
    mincnt = 0
    maxcnt = 0
    max = scores[0]
    min = scores[0]
    for i in range(0, len(scores)):
        if scores[i] > max:
            maxcnt = maxcnt + 1
            max = scores[i]
        if scores[i] < min:
            mincnt = mincnt + 1
            min = scores[i]
    return maxcnt, mincnt


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    n = int(input())
    scores = list(map(int, input().rstrip().split()))
    result = breakingRecords(scores)
    fptr.write(' '.join(map(str, result)))
    fptr.write('\n')
    fptr.close()

#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the breakingRecords function below.
def breakingRecords(scores):
    mincnt=0
    maxcnt=0
    max=scores[0]
    min=scores[0]
    for i in range(0, len(scores)):
        if(scores[i]>max):
            maxcnt=maxcnt+1
            max=scores[i]
        if(scores[i]<min):
            mincnt=mincnt+1
            min=scores[i]

    return maxcnt,mincnt

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input())

    scores = list(map(int, input().rstrip().split()))

    result = breakingRecords(scores)

    fptr.write(' '.join(map(str, result)))
    fptr.write('\n')

    fptr.close()
