public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		BigDecimal num;
		while (scan.hasNext()) {
			num = scan.nextBigDecimal();
			num = cubeRoot(num);
			String ans = num.toString();
			int index = ans.indexOf(".");
			ans = ans.substring(0,index+11);
			char[] a =ans.toCharArray();
			long sum = 0;
			for (int i = 0; i < a.length; i++)
				if (Character.isDigit(a[i]))
					sum += (a[i] - '0');
			System.out.println(sum % 10 + " " + ans);
		}
	}