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

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	} main {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int area=1; area 1 int length=0; length 0 while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		} scan.hasNext() scan.hasNext scan {
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		} int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan area*=num area num length+=num*2 length num*2 num 2 System.out.println(area+" "+length) System.out.println System.out System System.out area+" "+length area+" "+length area " " length String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	}
} Main
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int area=1;
		int length=0;
		while(scan.hasNext()){
			
			int num = scan.nextInt();
			area*=num;
			length+=num*2;
		}
		System.out.println(area+" "+length);
	}
}