use std::cmp; use std::io::{ self, prelude::* }; fn is_pow2(x: u64) -> bool { assert!(x > 0); (x & (x-1)) == 0 } fn main() { let mut s = String::new(); io::stdin().read_to_string(&mut s).unwrap(); let mut tokens = s.split_whitespace(); let n: u64 = tokens.next().unwrap().parse().unwrap(); for a in 3..cmp::min(1000,n) { let b = n - a; if !is_pow2(a) && !is_pow2(b) { println!("{} {}", a, b); return; } } println!("-1"); }