#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,y,s,c;
	cin>>x>>y;
	s=(x+y)*2;
	c=x*y;
	cout<<s<<endl<<c;

	return 0;
}
/**************************************************************
	Problem: 1416
	User: linyuhang
	Language: C++
	Result: Accepted
	Time:12 ms
	Memory:2072 kb
****************************************************************/