CCCGuide

Problem J1: Quadrant Selection

2017 · J1 · Original problem · DMOJ

Time limit: 1 second

Problem Description

A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below:

Quadrant 1 has Point A with coordinates (12, 5). Quadrant 2 has Point B with coordinates (negative 12, 5). Quadrant 3 has Point C with coordinates (negative 12, negative 5). Quadrant 4 has Point D with coordinates (12, negative 5).

For example, the point A, which is at coordinates (12, 5) lies in quadrant 1 since both its xx and yy values are positive, and point BB lies in quadrant 2 since its xx value is negative and its yy value is positive.

Your job is to take a point and determine the quadrant it is in. You can assume that neither of the two coordinates will be 00.

Input Specification

The first line of input contains the integer xx (−1000≤x≤1000;x≠0)(-1000 \leq x \leq 1000; x \not= 0). The second line of input contains the integer yy (−1000≤y≤1000;y≠0)(-1000 \leq y \leq 1000; y \not= 0).

Output Specification

Output the quadrant number (11, 22, 33 or 44) for the point (x,y)(x,y).

Sample Input 1

12
5

Output for Sample Input 1

1

Sample Input 2

9
-13

Output for Sample Input 2

4