#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(),(a).end() ll modpow(ll a, ll n, ll m) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % m; a = a * a % m; n >>= 1; } return res; } int main() { cin.tie(nullptr); ll a, n; cin >> a >> n; cout << 998244353 << '\n'; cout << modpow(a, n, 998244353ll) << '\n'; }