n = int(eval(input()))



xs = [int(x) for x in input().split()]



mx = xs[0]

count = 0

for x in xs:

    if x >= mx:

        count += 1

        mx = x



print(count)

line = eval(input())

line = eval(input())

numbers = [int(n) for n in line.split()]

predicted_value = 0

for i in range(len(numbers)):

    is_smaller = False

    for k in range(i):

        if numbers[i] < numbers[k]:

            is_smaller = True

            break

    if not is_smaller:

        predicted_value += 1

print(predicted_value)
n = int(eval(input()))
xs = [int(x) for x in input().split()]
mx = xs[0]
count = 0
for x in xs:
    if x >= mx:
        count += 1
        mx = x
print(count)

line = eval(input())
line = eval(input())
numbers = [int(n) for n in line.split()]
predicted_value = 0
for i in range(len(numbers)):
    is_smaller = False
    for k in range(i):
        if numbers[i] < numbers[k]:
            is_smaller = True
            break
    if not is_smaller:
        predicted_value += 1
print(predicted_value)

-n = int(eval(input())) -xs = [int(x) for x in input().split()] -mx = xs[0] -count = 0 -for x in xs: -    if x >= mx: -        count += 1 -        mx = x -print(count) +line = eval(input()) +line = eval(input()) +numbers = [int(n) for n in line.split()] +predicted_value = 0 +for i in range(len(numbers)): +    is_smaller = False +    for k in range(i): +        if numbers[i] < numbers[k]: +            is_smaller = True +            break +    if not is_smaller: +        predicted_value += 1 +print(predicted_value)