Submit solution

Points:
3 (partial)

Time limit:
1.0s

Memory limit:
1G

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

has been training hard for programming contests! One day, he decides to pick up a new data structure, the rage tree.

The rage tree efficiently supports operations on collections of integers - for example, it can be used to quickly find the minimum integer among a collection of integers or the maximum integer among a collection of integers.

To ensure that he properly understands the mechanics of the rage tree data structure, he will use one to solve the following problem:

`Given four integers, find the smallest integer among those four as well as the largest integer.`

would like to verify the correctness of his implementation, and asks you to also compute these integers.

#### Subtasks

In tests worth 5 marks, all four integers will be equal.

In tests worth another 5 marks, all four integers will be presented in nondecreasing order.

#### Input Specifications

The input will consist of four lines. Each line will contain a single positive integer between 1 and 100.

#### Output Specifications

Output two lines. On the first line, output the smallest integer. On the second line, output the largest integer.

#### Sample Input 1

```
1
1
1
1
```

#### Sample Output 1

```
1
1
```

#### Sample Input 2

```
1
2
3
4
```

#### Sample Output 2

```
1
4
```

## Comments