fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut m = 10_000_000; let mut a = 1; for _ in 0..n[1] { a *= n[0]; if a > m { (m, a) = (a, 0); break; } } println!("{}\n{}", m, a); }