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 JAVA):

Solution:
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Locale;

public class B80 
{
	public static void main(String[] args) throws IOException 
	{
		setStandardIO();
		//setFileIO("test");		
		
		String[] t = nextString().split(":");
		int hh = Integer.parseInt(t[0]);
		int mm = Integer.parseInt(t[1]);
		
		int dh = hh < 12 ? hh : hh - 12;
		int dm = mm; 
		
		print((dh == 0 ? 0 : 360.0 * dh / 12.0) + (30.0 * dm / 60.0));
		print(" ");
		print(dm == 0 ? 0 : (360.0 * dm / 60.0));
		
		flush();
	}

	// ~ -----------------------------------------------------------------------
	// ~ - Auxiliary code ------------------------------------------------------
	// ~ -----------------------------------------------------------------------
	static InputStream in;
	static PrintWriter out;

	/**
	 * Simple buffered reader class. Reads if buffer is empty. Try to fill up
	 * whole buffer.
	 */
	public static class SimpleBufferedInputStream extends InputStream 
	{
		// ~ Static fields / Initializers --------------------------------------
		private static int defaultCharBufferSize = 16384;
		private InputStream in;
		byte[] buffer;
		int pos = 0;
		int len = 0;
		
		// ~ Constructors ------------------------------------------------------
		public SimpleBufferedInputStream(InputStream in) {
			this(in, defaultCharBufferSize);
		}

		public SimpleBufferedInputStream(InputStream in, int size) {
			this.in = in;
			this.buffer = new byte[size];
		}
	    
		// ~ Methods -----------------------------------------------------------
		@Override
		public int read() throws IOException {
			if (pos < len)
				return buffer[pos++];
			
			len = in.read(buffer);
			if (len == -1)
				return len;
			
			pos = 0;
			if (len <= 0)
				return -1;
			
			return buffer[pos++];
		}
	}

	public static void setStandardIO() {
		in = new SimpleBufferedInputStream(System.in);
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	public static void setFileIO(String fileName) throws IOException {
		in = new SimpleBufferedInputStream(new FileInputStream(fileName + ".in"));
 		out = new PrintWriter(new BufferedWriter(new FileWriter(fileName + ".out")));
	}

	public static int skipWhitespaces() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (c == -1) throw new IOException();
			if (!isWhitespace(c)) break;
		}	
		
		return c;
	}
	
	public static int skipNewLines() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (c == -1) throw new IOException();
			if (!isNewLine(c)) break;
		}	
		
		return c;
	}

	public static boolean isNewLine(int c) {
		return c == '\n' || c == '\r' ? true : false;
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' ? true : false;
	}
	
	public static int nextNoWhitespace() throws IOException {
		int c = in.read();
		if (c == -1 || isWhitespace(c)) return -1;
		
		return c;
	}

	public static int nextNoNewLine() throws IOException {
		int c = in.read();
		if (c == -1 || isNewLine(c)) return -1;
		
		return c;
	}

	public static long nextLong() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (!isWhitespace(c)) break;
			if (c == -1) throw new RuntimeException();
		}	

		boolean neg = false;
		long val = 0;
		if (c == '-')
			neg = true;
		else 
			val = c - '0';
		
		for (;;) {
			c = in.read();
			if (isWhitespace(c) || c == -1) 
				break;
			
			val = val * 10 + (c - '0');
		}

		if (neg) 
			return -val;
		
		return val;
	}

	public static int nextInt() throws IOException {
		int c;
		for (;;) {
			c = in.read();
			if (!isWhitespace(c)) break;
			if (c == -1) throw new RuntimeException();
		}	
		
		boolean neg = false;		
		int val = 0;
		if (c == '-')
			neg = true;
		else 
			val = c - '0';
		
		for (;;) {
			c = in.read();
			if (isWhitespace(c) || c == -1) 
				break;
			
			val = val * 10 + (c - '0');
		}

		if (neg) 
			return -val;
		
		return val;
	}

	public static byte nextByte() throws IOException {
		return (byte) nextInt();
	}

	public static String nextLine() throws IOException {
		int c = (char) skipNewLines();
		
		StringBuilder sb = new StringBuilder();
		sb.append((char) c);
		
		for (;;) {
			c = nextNoNewLine();
			if (c == -1)
				break;
			
			sb.append((char) c);
		}

		return sb.toString();
	}

	public static String nextString() throws IOException {
		int c = (char) skipWhitespaces();
		
		StringBuilder sb = new StringBuilder();
		sb.append((char) c);
		
		for (;;) {
			c = nextNoWhitespace();
			if (c == -1)
				break;
			
			sb.append((char) c);
		}

		return sb.toString();
	}

	public static double nextDouble() throws IOException {
		return Double.parseDouble(nextString());
	}	
	
	public static BigDecimal nextBigDecimal() throws IOException {
		return new BigDecimal(nextString());
	}
	
	public static void flush() {
		out.flush();
	}

	public static void println(Object object) {
		out.println(object);
	}

	public static void print(Object object) {
		out.print(object);
	}

	public static void println(double d, int precision) {
		String s = "%1$." + precision + "f";
		out.format(Locale.ENGLISH, s, d);
		out.println();
	}

	public static void println(BigDecimal d, int precision) {
		String s = "%1$." + precision + "f";
		out.format(Locale.ENGLISH, s, d);
		out.println();
	}
}