#include <iostream>

using namespace std;

int f(int *a,int *b)
{
    *a = 2 * (*a);
    *b = 3 * (*b);

    return *a+(*b);
}

int main()
{
    int x=5;
    int y=8;
    int z;

    z = f(&x,&y);

    cout <<x<<"  "<<y<<"  "<<z<<endl;

    return 0;
}
