Cockroaches in the Building#4961

Cockroaches in the Building

1,5 Sekunden
64 Megabyte
Leicht

Petya lives in a many-storied building where each flat occupies an entire story. Petya has studied local flora and fauna for many years. Having performed monthly metering, he notices the following peculiarities:

Petya becomes interested in inducing the ways the insects' population size changes under these laws. To avoid the special cases of ground floor and top floor, where the laws might be more complicated, Petya decided to solve this problem for an infinite-storied skyscraper. Let's consider that the number of cockroaches can decrease if they can be distributed among the flats (having no more than in any) in such a way that in the next month the total number of cockroaches in the building will decrease. Only a finite number of cockroaches can exist in the building; thus, all the flats, except a finite number of them, are free from these insects. Likewise, the number of cockroaches can increase if they can be distributed among the flats in such a way that in the next month the total number of cockroaches in the building will increase (and may possibly become infinite).

Eingabe

The first line of the input contains the single number — the maximum number of cockroaches in a flat. Following are samples of the function that defines the changes in the number of cockroaches in a flat. The samples are organized in a table having N+1 block, where each block has N+1 lines, and each line has N+1 numbers ranged from to . 'th number of 'th line of 'th block contains the number of cockroaches in the flat for the current month if in the previous month there were cockroaches in it, cockroaches in the flat below, and cockroaches in the flat above. The indices of blocks, lines, and numbers are zero-based. Petya has studied that if there were no cockroaches in some flat and in the flats below and above it in the previous month then there are no cockroaches in it in the current month.

Ausgabe

The output must contain either:

  • =, if the number of cockroaches can neither increase nor decrease, or

  • <, if the number of cockroaches can decrease, but not increase, or

  • >, if the number of cockroaches can increase, but not decrease, or

  • <>, if the number of cockroaches can both increase and decrease.

Beispiele

Beispiel 1

Loading
Loading