package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) var out = bufio.NewWriter(os.Stdout) func main() { buf := make([]byte, 1024*1024) sc.Buffer(buf, bufio.MaxScanTokenSize) sc.Split(bufio.ScanWords) a, n := nextInt(), nextInt() const m = 998244353 ans := Pow(a, n, m) PrintInt(ans) } func nextInt() int { sc.Scan() i, _ := strconv.Atoi(sc.Text()) return i } func PrintInt(x int) { defer out.Flush() fmt.Fprintln(out, x) } func Pow(x, y, p int) int { ret := 1 for y > 0 { if y%2 == 1 { ret = ret * x % p } y >>= 1 x = x * x % p } return ret }