Under construction

Still being built. Things may change

Broken clock

Time limit0.5sMemory limit512 MB

Summary
Given the clock-face angles of an hour hand and a minute hand in whole degrees, decide whether both can point that way at the same instant on a working clock.
Level

Easy3 of 10

Topics
Math, Number theory, Implementation, Brute force
Solved
No attempts yet

Problem

Sangeon hurt his leg on his first day at the training camp, so he took the bus whenever he had to travel any distance. One day he looked at the analog clock mounted at the front of the bus and noticed that something was wrong with it. It pointed at a time that no working clock can show. Decide whether a clock is broken by looking only at the directions of its hour hand and minute hand.

On a working clock both hands point exactly at the 12 o'clock direction at 12:00. The hour hand makes one full turn every 12 hours and the minute hand makes one full turn every hour. Both move clockwise at a constant speed.

Input

The first line contains the angle of the hour hand θ1\theta_1 and the angle of the minute hand θ2\theta_2 as integers (0≤θ1,θ2≤3590 \le \theta_1, \theta_2 \le 359). Both angles are measured clockwise from the 12 o'clock direction. For example, the 3 o'clock direction is 9090 and the 9 o'clock direction is 270270.

Output

Print O on the first line if the two given angles can occur on a working clock, and X if they cannot.

Hint

An hour hand pointing at the 6 o'clock direction together with a minute hand pointing at the 12 o'clock direction is what a clock shows at exactly 6:00, so it is normal. An hour hand pointing at the 12 o'clock direction while the minute hand points at the 6 o'clock direction cannot occur on a working clock.

Examples2

  1. Example 1

    Input
    180 0
    
    Expected output
    O
    
  2. Example 2

    Input
    0 180
    
    Expected output
    X