#include <iostream.h>
 
int main()
{
    int a=0, b=0;
    std::cout << "Enter a, b: ";
    std::cin >> a >> b;
    std::cout << "S = " << a * b << std::endl;
    std::cout << "P = " << 2 * (a + b) << std::endl;
    system("pause");
    return 0;
}
