#K36662. High and Low
High and Low
High and Low
Given a string of space-separated integers, find the highest and the lowest integer in the sequence. Your task is to output the highest and lowest numbers separated by a single space.
In mathematical terms, if the input string contains numbers \(a_1, a_2, \dots, a_n\), you need to determine \(\max\{a_i\}\) and \(\min\{a_i\}\). The output should be in the format: maximum minimum.
For example, given the input "1 2 3 4 5 -9 42", the output should be "42 -9".
inputFormat
A single line containing space-separated integers. The line is provided through standard input (stdin).
outputFormat
A single line containing two integers separated by a space: the highest number followed by the lowest number. The result is printed to standard output (stdout).## sample
1 2 3 4 5 -9 42
42 -9
</p>