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

/**************************************************************
	Problem: 1416
	User: shiruoxi
	Language: C++
	Result: Accepted
	Time:20 ms
	Memory:2072 kb
****************************************************************/