Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/lift-yoki-zinapoya

Elevator or stairs

Easy 1000 ms 64 MB 17%
Share

A person wants to go up from floor $1$ of a building to floor $n$. On the stairs, one floor takes $s$ seconds. The elevator has to be waited for $w$ seconds, then it passes one floor in $v$ seconds. So the stairs take $(n - 1) * s$ seconds and the elevator takes $w + (n - 1) * v$ seconds. Determine which way is faster.

Floors of a building: stairs on the left, an elevator on the right; going from floor 1 to floor n both ways

Input

One line with four integers: $n$, $s$, $v$ and $w$.

Output

One word: zinapoya if the stairs are faster, lift if the elevator is faster, teng if the times are equal.

Note

$2 \le n \le 100$
$1 \le s, v \le 60$
$0 \le w \le 600$

Examples

Input #1
10 20 5 30
Output #1
lift
Input #2
3 10 10 0
Output #2
teng

Sign in to submit a solution

Signing up is free and takes a minute.