#include <bits/stdc++.h>

using namespace std;

void fast_io() {
	ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
}
#include <atcoder/modint>
using mint = atcoder::modint998244353;
using vec = vector<mint>;
using mat = vector<vec>;
mat operator+(const mat &a, const mat &b) {
	int n = a.size();
	int m = a[0].size();
	mat c(n, vec(m));
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			c[i][j] = a[i][j] + b[i][j];
		}
	}
	return c;
}
mat operator-(const mat &a, const mat &b) {
	int n = a.size();
	int m = a[0].size();
	mat c(n, vec(m));
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			c[i][j] = a[i][j] - b[i][j];
		}
	}
	return c;
}
mat mul(mat a, mat b) {
	int n = a.size();
	int m = b.size();
	int l = b[0].size();
	mat c(n, vec(l));
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			for (int k = 0; k < l; k++) {
				c[i][k] += a[i][j] * b[j][k];
			}
		}
	}
	return c;
}
mat pow(mat a, long long n) {
	int m = a.size();
	mat res(m, vec(m));
	for (int i = 0; i < m; i++) {
		res[i][i] = 1;
	}
	while (n > 0) {
		if (n & 1) {
			res = mul(res, a);
		}
		a = mul(a, a);
		n >>= 1;
	}
	return res;
}
mat inv(mat a) {
	assert(a.size() == 2);
	mint det = a[0][0] * a[1][1] - a[0][1] * a[1][0];
	mat b = {{a[1][1], -a[0][1]}, {-a[1][0], a[0][0]}};
	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < 2; j++) {
			b[i][j] /= det;
		}
	}
	return b;
}
int main() {
	fast_io();
	long long x1, y1, n;
	cin >> x1 >> y1 >> n;
	mint x = x1, y = y1;
	if (x == 1 && y == 0) {
		cout << mint(n).val() << " " << 0 << endl;
		return 0;
	}
	mat A = {{x, -5 * y}, {y, x}};
	// A * (A^n - I) / (A - I)
	mat B = pow(A, n) - mat{{1, 0}, {0, 1}};
	mat C = inv(A - mat{{1, 0}, {0, 1}});
	mat b = mul(A, mul(C, B));

	cout << b[0][0].val() << " " << b[1][0].val() << endl;
}