#include using namespace std; long long a,b,n,p=1; int main() { cin >> a >> b >> n; while(p < n) p*=2; p/=2; cout << a*1+b << " " << a*(p+1)+b; }