#include #include int main(){ using namespace std; using modint = atcoder::static_modint<998244353>; unsigned long a, n; cin >> a >> n; cout << 998244353 << endl << modint::raw(a).pow(n).val() << endl; return 0; }