import java.lang.*;
import java.io.*;
import geotransform.coords.*;
import geotransform.ellipsoids.*;
import geotransform.transforms.*;

public class gdc2utm
{
    public static void main(String argv[]) throws IOException
    {
	double lat = 0, lon = 0;
	int esecs = 0, easting, northing, old_easting = 0, old_northing = 0;
	int eof = 0;
	StreamTokenizer st;
	
	st = new StreamTokenizer(System.in);	// Get 2 numbers from stdin
	
	while ( eof != 1 ) {
scan:
	  switch ( st.nextToken() ) {
	    default:
		break;
	    case StreamTokenizer.TT_EOL:
		break;
	    case StreamTokenizer.TT_NUMBER:
		esecs = (int) st.nval;
	  	if (st.nextToken() == StreamTokenizer.TT_NUMBER) {
		   lat = st.nval;
		   if (st.nextToken() == StreamTokenizer.TT_NUMBER) {
		   	lon = st.nval;
	  	   }
	  	}
		break;
	    case StreamTokenizer.TT_EOF:
 		eof = 1;
		break scan;
	  } // End switch

	  Gdc_Coord_3d gdc_point = new Gdc_Coord_3d();
	  Utm_Coord_3d utm_point = new Utm_Coord_3d();
        
          Gdc_To_Utm_Converter.Init(new WE_Ellipsoid());        
  
	  gdc_point = new Gdc_Coord_3d(lat, lon, 0.0);  // convert the points.
	
	  Gdc_To_Utm_Converter.Convert(gdc_point, utm_point); // with points

	  easting = (int)(utm_point.x);
	  northing = (int)(utm_point.y);

	  System.out.println(esecs + " " + easting + " " + northing + " " + utm_point.zone);
	 
	} // End while()



    } // end main
}// end gdc2utm
