use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let n: Vec = s.split_whitespace().skip(1).flat_map(str::parse).collect(); if n.chunks(2).all(|x| x[0] - 30000 * x[1] < 500000) { println!("NO"); return; } println!("YES"); let a = n .chunks(2) .enumerate() .filter(|x| x.1[0] - 30000 * x.1[1] >= 500000) .max(); (0..6).for_each(|_| println!("{}", a.unwrap().0 + 1)) }