Under construction

Still being built. Things may change

Three-Way Comparison

Time limit2sMemory limit1024 MB

Summary
Given two integers A and B, the task is to print -1, 0, or 1 depending on whether A is less than, equal to, or greater than B.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

Two integers A and B are given. Compare A and B. Print -1 if A < B, 0 if A = B, and 1 if A > B.

Input

The input is given from standard input in the following format.

A
B

Output

Print -1 if A < B, 0 if A = B, and 1 if A > B.

Constraints

  • 1 ≤ A ≤ 1000.
  • 1 ≤ B ≤ 1000.
  • A and B are integers.

Examples3

  1. Example 1

    Input
    3
    7
    
    Expected output
    -1
    
  2. Example 2

    Input
    10
    10
    
    Expected output
    0
    
  3. Example 3

    Input
    1000
    1
    
    Expected output
    1