Problem: 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: 

<image>

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.

Input

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.

Output

Print two numbers x and y — the angles of turning the hour and minute hands, respectively (0 ≤ x, y < 360). The absolute or relative error in the answer should not exceed 10 - 9.

Examples

Input

12:00


Output

0 0

Input

04:30


Output

135 180

Input

08:17


Output

248.5 102

Note

A note to the second example: the hour hand will be positioned exactly in the middle, between 4 and 5.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool ISLETTER(char t) {
  if (t >= 'A' && t <= 'Z') return true;
  return false;
}
bool isletter(char t) {
  if (t >= 'a' && t <= 'z') return true;
  return false;
}
bool is_num(char t) {
  if (t >= '0' && t <= '9') return true;
  return false;
}
bool is_vowal(char t) {
  if (t == 'a' || t == 'e' || t == 'i' || t == 'o' || t == 'u' || t == 'y')
    return true;
  if (t == 'A' || t == 'E' || t == 'I' || t == 'O' || t == 'U' || t == 'Y')
    return true;
  return false;
}
bool isLN(int aa) {
  while (aa) {
    if (aa % 10 != 4 && aa % 10 != 7) return false;
    aa /= 10;
  }
  return true;
}
int MOD(int aa) {
  if (aa < 0) aa *= -1;
  return aa;
}
int GCD(int a, int b) {
  if (a < b) swap(a, b);
  return (!b) ? a : GCD(b, a % b);
}
void DFS() {}
void BFS() {}
bool okok[1000005];
vector<int> divi[1000005];
int primes[1000005], cntp;
void Criba() {
  for (int i = 2; i < 1000005;) {
    if (!okok[i]) {
      primes[cntp++] = i;
      for (int j = 1; i < 1000005 / j; j++) {
        divi[i * j].push_back(i);
        okok[i * j] = true;
      }
    }
    if (i == 2)
      i++;
    else if (i == 3)
      i += 2;
    else if (i % 6 == 1)
      i += 4;
    else
      i += 2;
  }
}
void UpdateAbi(int idx, int s, int n, int* abi) {
  while (idx <= n) {
    abi[idx] += s;
    idx += (idx & -idx);
  }
}
void QueryAbi(int idx, int* abi) {
  int qresp(0);
  while (idx) {
    qresp += abi[idx];
    idx -= (idx & -idx);
  }
}
struct T {};
double a, b;
int main() {
  cin >> a;
  getchar();
  cin >> b;
  if (a >= 12) a -= 12;
  cout << a * 30 + b / 2 << " " << b * 6;
  return 0;
}