Back to tasks
The quarter
BeginnerPython for kids 路 Lesson 26: An if inside an if
Problem Statement
A point (x, y) lies in one of the four quarters of a coordinate grid: 1 - x and y positive, 2 - x negative and y positive, 3 - both negative, 4 - x positive and y negative. Read x and y (neither is zero) and print the quarter number.
Input Format
Two whole numbers x and y (not zero, -1000..1000), each on its own line.
Output Format
One number - the result.
Examples
Example 1
Input
3 5
Output
1
Example 2
Input
-3 5
Output
2
Example 3
Input
-3 -5
Output
3
Example 4
Input
3 -5
Output
4