#K47197. Stable Block Arrangement
Stable Block Arrangement
Stable Block Arrangement
You are given an arrangement of N blocks. Each block is represented by three integers: width
, height
, and number
. A block is considered to be sufficiently supported if the following inequality holds:
$$ \text{height} \leq \frac{\text{number}}{\text{width}} $$
The arrangement is stable if every block satisfies the above inequality, otherwise it is unstable.
Your task is to determine if the arrangement is stable. Print Stable
if the arrangement is stable, or Unstable
otherwise.
inputFormat
The first line contains an integer N
representing the number of blocks. Each of the next N
lines contains three space-separated integers: width
, height
, and number
.
It is guaranteed that all values are positive integers.
outputFormat
Output a single line: Stable
if the arrangement is stable, or Unstable
otherwise.
3
3 2 9
2 1 4
5 4 25
Stable