Write a program that reads a sequence of rectangle pairs, and for each pair, states whether one rectangle fits inside the other. A rectangle fits inside another if the width of is smaller or equal than the witdh of , and the same happens with its height. A rectangle also may fit inside another after rotating 90 degrees (i.e. exchanging its width and height)
The input is a sequence of pairs of rectangles. Each rectangle in a
pair is given as two integer numbers w,h
corresponding to its width and height.
The output is, for each pair of rectangles, whether the first rectangle fits inside the second, the second inside the first, or no fitting is possible. Follow the format of the examples.
Input
2 8 7 1 5 2 3 6 4 5 5 3 2 9 6 1 3 7 6 2 5 3 9 1 3 8 8 3 1 5 6 4 7 1 6 2
Output
second inside first first inside second second inside first second inside first second inside first no fitting first inside second first inside second no fitting