N = int(eval(input()))

a = input().split()

min = 1000000

max = -1000000

kei = 0

for i in a:

    i = int(i)

    if i < min:

        min = i

    if i > max:

        max = i

    kei += i

print((min, max, kei))
n = int(eval(input()))

a = list(map(int, input().split()))

min_a = 1000000

max_a = -1000000

sum_a = 0

for i in range(n):

    if min_a > a[i]:

        min_a = a[i]

    

    if max_a < a[i]:

        max_a = a[i]



    sum_a += a[i]



print((min_a, max_a, sum_a))
N = int(eval(input()))
a = input().split()
min = 1000000
max = -1000000
kei = 0
for i in a:
    i = int(i)
    if i < min:
        min = i
    if i > max:
        max = i
    kei += i
print((min, max, kei))

n = int(eval(input()))
a = list(map(int, input().split()))
min_a = 1000000
max_a = -1000000
sum_a = 0
for i in range(n):
    if min_a > a[i]:
        min_a = a[i]
    if max_a < a[i]:
        max_a = a[i]
    sum_a += a[i]
print((min_a, max_a, sum_a))

-N = int(eval(input())) -a = input().split() -min = 1000000 -max = -1000000 -kei = 0 -for i in a: -    i = int(i) -    if i < min: -        min = i -    if i > max: -        max = i -    kei += i -print((min, max, kei)) +n = int(eval(input())) +a = list(map(int, input().split())) +min_a = 1000000 +max_a = -1000000 +sum_a = 0 +for i in range(n): +    if min_a > a[i]: +        min_a = a[i] +    if max_a < a[i]: +        max_a = a[i] +    sum_a += a[i] +print((min_a, max_a, sum_a))