use std::io; fn main() { let mut input = String::new(); io::stdin() .read_line(&mut input) .expect("Failed to read line."); let iv: Vec<&str> = input.split_whitespace().collect(); let mut a:u64 = iv[0].parse().unwrap(); let mut n:u64 = iv[1].parse().unwrap(); let mut ans:u64 = 1; let m = 998244353; while n > 0 { if (n & 1) == 1 { ans = ans * a % m; } a = a * a % m; n >>= 1; } println!("{}\n{}", m, ans); }