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 x: i64 = itr.next().unwrap().parse().unwrap(); let mut f: Vec = (0..x + 5).collect(); for i in 1..x + 1 { let mut j = i; while j <= x + 1 { f[j as usize] -= 1; j += i; } } let mut min = 1 << 30; let mut out = Vec::new(); for i in 1..x { min = std::cmp::min(min, (f[(x - i) as usize] - f[i as usize]).abs()); } for i in 1..x { if (f[(x - i) as usize] - f[i as usize]).abs() == min { writeln!(out, "{} {}", i, x - i).ok(); } } stdout().write_all(&out).unwrap(); }