use proconio::input; fn main() { input! { n: usize, points: [(i64, i64); 2 * n] } let p = [ 99877, 99881, 99901, 99907, 99923, 99929, 99961, 99971, 99989, 99991, ]; for i in 0..10 { for j in 0..i { let (a, b) = (p[i], p[j]); let mut z = points .iter() .map(|&(x, y)| a * x + b * y) .collect::>(); z.sort_unstable(); let c0 = z[n - 1]; let c1 = z[n]; if c0 < c1 && c0 + 1 < c1 { let c = -(c0 + 1); println!("{a} {b} {c}"); return; } } } unreachable!(); }