#include using namespace std; #define ios ios_base::sync_with_stdio(false);cin.tie(0); #define setnow clock_t tStart=clock(); #define time (double)(clock() - tStart)/CLOCKS_PER_SEC; #define setin(x) ifstream cin(x); #define setout(x) ofstream cout(x); typedef long long ll; typedef long long int lli; typedef pair < int, int> dbl; const int maxInt = 1e9*2; const lli maxLong = 1e18*2; int main(){ int a,b,n; cin >> a >> b >> n; if(n%2==1){ return cout << a*1+b << ' ' << a*n+b, 0; } if(n%2==0 && n/2%2==1) return cout << a*1+b << ' ' << a*(n-1)+b, 0; if(n<=4) return cout << a*1+b << ' ' << a*3+b, 0; else if(n%2==0 && n/2%2==0) return cout << a*1+b << ' ' << a*(n-3)+b, 0; }