#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: linmiaoling
Language: C++
Result: Accepted
Time:12 ms
Memory:2072 kb
****************************************************************/