printРабочее место участника

printЗадачи

1542. Box Building

Ограничения: время – 100ms/500ms, память – 64MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

Any square is a rectangle, any rectangle is a quadrangle, and any quadrangle is composed of four sides. But not all rectangles are squares, not all quadrangles are rectangles, and not all sets of four sides are quadrangles.
Elly has four pieces of plank and she wants to build a square box for her mexican jerbo. If not, she wants to build a rectangular box. If not, she wants to build a quadrangular box at least.
The first line of the input contains four positive integer numbers, between 1 and `2^30` – the length of sides.
The output should consist of a line with the text "square", "rectangle", "quadrangle" or "none", if four sides can form a square, a rectangle, a quadrangle or none, respectively.

Sample Input #1

10 8 7 6

Sample Output #1

quadrangle

Sample Input #2

9 1 9 1

Sample Output #2

rectangle

Sample Input #3

29 29 29 29

Sample Output #3

square

Sample Input #4

5 12 30 7

Sample Output #4

none
loading