macro_rules! read_line { ($($xs: tt)*) => { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).unwrap(); let mut iter = buf.split_whitespace(); expand!(iter, $($xs)*); }; } macro_rules! expand { ($iter: expr,) => {}; ($iter: expr, mut $var: ident : $type: tt, $($xs: tt)*) => { let mut $var = value!($iter, $type); expand!($iter, $($xs)*); }; ($iter: expr, $var: ident : $type: tt, $($xs: tt)*) => { let $var = value!($iter, $type); expand!($iter, $($xs)*); }; } macro_rules! value { ($iter:expr, ($($type: tt),*)) => { ($(value!($iter, $type)),*); }; ($iter: expr, [$type: tt; $len: expr]) => { (0..$len).map(|_| value!($iter, $type)).collect::>() }; ($iter: expr, Chars) => { value!($iter, String).chars().collect::>>() }; ($iter: expr, $type: ty) => { if let Some(v) = $iter.next() { v.parse::<$type>().ok() } else { None } }; } use std::collections::BTreeMap; pub fn integer_factorization(mut n: usize) -> BTreeMap { let mut map = BTreeMap::new(); let mut i = 2; while i * i <= n { while n % i == 0 { *map.entry(i).or_insert(0) += 1; n /= i; } i += 1; } if n != 0 && n != 1 { *map.entry(n).or_insert(0) += 1; } map } fn main() { read_line! { n: usize, } let n = n.unwrap(); let g = integer_factorization(n) .into_iter() .map(|pe| pe.1) .fold(0, |x, y| x ^ y); println!("{}", if g != 0 { "Alice" } else { "Bob" }); }