use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let _: usize = itr.next().unwrap().parse().unwrap(); let mut i = 2; let mut ans = 1; while i * i <= n { if n % i == 0 { ans = std::cmp::max(ans, n / i); } i += 1; } println!("{}", ans); }