Problem list
Log in
#r03322 · Online Judge > GoldOJ

Quadrant

Bronze V 1.0 s 256 MB

Given a point $(x, y)$ with $x, y \ne 0$, print which quadrant it lies in ($1$, $2$, $3$, or $4$).

Input

Two integers $x$, $y$ ($-10^9 \le x, y \le 10^9$, both non-zero).

Output

Print the quadrant number.

Example 1

Input
-3 5
Output
2
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code