#K39002. Color Spectrum Days

    ID: 26323 Type: Default 1000ms 256MiB

Color Spectrum Days

Color Spectrum Days

You are given a list of integers representing the number of days required for each tree's leaves to change colors. Your task is to determine the earliest and the latest days when the trees achieve their full color change.

In other words, if the input list is \( D = [d_1, d_2, \dots, d_n] \), you need to compute \( \min(D) \) and \( \max(D) \). Print the two values separated by a space.

This problem tests your basic understanding of arrays and simple computations. Good luck!

inputFormat

The first line contains a single integer \( n \) which represents the number of trees.

The second line contains \( n \) space-separated integers where each integer represents the number of days required for the corresponding tree to fully change color.

outputFormat

Output two integers: the minimum and the maximum value from the list, separated by a space.

## sample
5
10 15 20 25 30
10 30

</p>