package main import ( "fmt" "math" ) func mod(x, y int) int { m := x % y if m < 0 { return m + y } return m } func pow(x, y int) int { return int(math.Pow(float64(x), float64(y))) } func main() { var a,n int fmt.Scan(&a,&n) const M int = 987654321 fmt.Println(M) fmt.Println(mod(pow(a,n),M)) }