/* package whatever; // don't place package name! */

import java.io.*;
import java.util.*;

/* The class name doesn't have to be Main, as long as the class is not public. */
public class Main {
        
        public static void main(String[] args) {
		
		BufferedReader stdin = new BufferedReader
      		(new InputStreamReader(System.in));
    		String seed;
		long iSeed;
		
		System.out.flush();
		try {
		seed = stdin.readLine();
		}catch(java.io.IOException exp){ exp.printStackTrace(); seed="404";}

                Random c = new Random();

		try {
    			iSeed = Long.parseLong(seed);
		}
			catch(NumberFormatException nFE) {
    			iSeed = seed.hashCode();
		}
                
		c.setSeed(iSeed);
		double d = c.nextDouble() * 3.1415926535897931D * 2D;
            	for(int l = 0; l < 3; l++)
            	{
                	double d1 = (1.25D + c.nextDouble()) * 32D;
                	int j1 = (int)Math.round(Math.cos(d) * d1);
                	int k1 = (int)Math.round(Math.sin(d) * d1);

                	int j2 = (j1 << 4) + 8;
                	int k2 = (k1 << 4) + 8;

                	System.out.println(l + ": " + j2 + " " + k2);

                	d += 6.2831853071795862D / 3D;
            	}  
        }
}