https://www.acmicpc.net/problem/1668
trophy_count = int(input())
trophies = []
for _ in range(trophy_count):
trophies.append(int(input()))
left_view_count = 1
trophies.reverse()
prev_height = trophies[0]
for index, trophy in enumerate(trophies):
if index == 0:
continue
if prev_height < trophy:
left_view_count += 1
prev_height = trophy if trophy > prev_height else prev_height
right_view_count = 1
trophies.reverse()
prev_height = trophies[0]
for index, trophy in enumerate(trophies):
if index == 0:
continue
if prev_height < trophy:
right_view_count += 1
prev_height = trophy if trophy > prev_height else prev_height
print(right_view_count)
print(left_view_count)
def ascending(items):
now = items[0]
result = 1
for i in range(1, len(items)):
if now < items[i]:
result += 1
now = items[i]
return result
n = int(input())
array = []
for _ in range(n):
array.append(int(input()))
print(ascending())
array.reverse()
print(ascending(array))