Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/soat-strelkalari-burchagi

Angles of the clock hands

Easy 1000 ms 64 MB 17%
Share

$N$ seconds have passed since the start of the day. Find by how many degrees clockwise from the number $12$ the hour hand and the minute hand have turned. At the start of the day both hands point to $12$. The hands move uniformly: the hour hand makes a full turn ($360$ degrees) in $12$ hours, the minute hand in $60$ minutes.

A clock face: the hour and minute hands; the angle of each from the number 12 is marked with an arc

Input

One integer $N$.

Output

One line with two integers: the angles of the hour hand and the minute hand, the integer part of the degrees (from $0$ to $359$).

Note

$0 \le N \le 86399$

Examples

Input #1
12000
Output #1
100 120
Input #2
45299
Output #2
17 209

Sign in to submit a solution

Signing up is free and takes a minute.