#include <iostream>
int main() {
int length, width;
std::cin >> length >> width;
int perimeter = 2 * (length + width);
int area = length * width;
std::cout << perimeter << std::endl;
std::cout << area << std::endl;
return 0;
}
/**************************************************************
Problem: 1416
User: fuyijun
Language: C++
Result: Accepted
Time:9 ms
Memory:2072 kb
****************************************************************/