#include <iostream> using namespace std; typedef long long int64; int main() { int64 n, a, b; cin >> a >> b >> n; int64 first = b + a; int j = 0; while ((1LL<<j) <= n) ++j; --j; int64 second = b + a * ((1LL<<j) + 1); cout << first << " " << second << "\n"; }