import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan= new Scanner(System.in);
int i=0;
int j=0;
String str="";
boolean isFlag=false;
while(scan.hasNextInt()){
i=scan.nextInt();
j=scan.nextInt();
if(i*j!=0){
if(!isFlag){
isFlag=true;
System.out.print((i*j)+" "+(j-1));
}else{
System.out.print(" "+(i*j)+" "+(j-1));
}
}
}
scan.close();
if(!isFlag){
System.out.print("0 0");
}
}
}
共勉!