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

~/algor $ cat problems/if-nuqta-va-togri-chiziq

Point and line

Easy 1000 ms 64 MB 23%
Share

A line $y = k * x + b$ and a point $(x; y)$ are given on the plane. Determine where the point is relative to the line: print yuqorida (above) if $y > k * x + b$, ustida (on the line) if $y = k * x + b$, pastda (below) if $y < k * x + b$.

A point above the line, on it or below it

Input

One line with four integers: $k$, $b$, $x$ and $y$.

Output

One word: yuqorida, ustida or pastda.

Note

$-10^{4} \le k, b, x \le 10^{4}$
$-10^{9} \le y \le 10^{9}$

Examples

Input #1
1 1 1 3
Output #1
yuqorida
Input #2
1 1 2 3
Output #2
ustida

Sign in to submit a solution

Signing up is free and takes a minute.