Do you remember a kind cartoon "Beauty and the Beast"? No, no, there was no firing from machine guns or radiation mutants time-travels!

There was a beauty named Belle. Once she had violated the Beast's order and visited the West Wing. After that she was banished from the castle... 

Everybody was upset. The beautiful Belle was upset, so was the Beast, so was Lumiere the candlestick. But the worst thing was that Cogsworth was upset. Cogsworth is not a human, but is the mantel clock, which was often used as an alarm clock.

Due to Cogsworth's frustration all the inhabitants of the castle were in trouble: now they could not determine when it was time to drink morning tea, and when it was time for an evening stroll. 

Fortunately, deep in the basement are lying digital clock showing the time in the format HH:MM. Now the residents of the castle face a difficult task. They should turn Cogsworth's hour and minute mustache hands in such a way, that Cogsworth began to show the correct time. Moreover they need to find turn angles in degrees for each mustache hands. The initial time showed by Cogsworth is 12:00.

You can only rotate the hands forward, that is, as is shown in the picture: 

As since there are many ways too select such angles because of full rotations, choose the smallest angles in the right (non-negative) direction.

Note that Cogsworth's hour and minute mustache hands move evenly and continuously. Hands are moving independently, so when turning one hand the other hand remains standing still.
The only line of input contains current time according to the digital clock, formatted as HH:MM (00 ≤ HH ≤ 23, 00 ≤ MM ≤ 59). The mantel clock initially shows 12:00.

Pretests contain times of the beginning of some morning TV programs of the Channel One Russia.
A note to the second example: the hour hand will be positioned exactly in the middle, between 4 and 5.
12:00
0 0
04:30
135 180
08:17
248.5 102
07:20
220 120
09:55
297.5 330
11:59
359.5 354
01:23
41.5 138
11:00
330 0
00:00
0 0
12:30
15 180
23:59
359.5 354
20:00
240 0
23:45
352.5 270
07:14
217 84
15:15
97.5 90
16:05
122.5 30
19:55
237.5 330
23:58
359 348
14:33
76.5 198
18:00
180 0
00:24
12 144
19:45
232.5 270
20:05
242.5 30
21:13
276.5 78
08:04
242 24
07:40
230 240
19:12
216 72
06:36
198 216
06:16
188 96
11:49
354.5 294
18:45
202.5 270
06:44
202 264
20:45
262.5 270
17:48
174 288
08:09
244.5 54
04:12
126 72
21:30
285 180
12:56
28 336
00:43
21.5 258
02:54
87 324
02:29
74.5 174
17:24
162 144
14:27
73.5 162
16:37
138.5 222
14:40
80 240
01:00
30 0
21:40
290 240
08:47
263.5 282
11:30
345 180
08:31
255.5 186
04:11
125.5 66
19:27
223.5 162
10:54
327 324
01:20
40 120
12:33
16.5 198
11:32
346 192
15:36
108 216
23:45
352.5 270
20:12
246 72
15:28
104 168
00:01
0.5 6
12:01
0.5 6
23:01
330.5 6
00:59
29.5 354
12:59
29.5 354
23:00
330 0
h, m = map(int, input().split(':'))
print(30 * (h % 12) + m / 2, m * 6)# 1698237007.1978533