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 mut a = Vec::new(); for i in 0..n { let b: usize = itr.next().unwrap().parse().unwrap(); let c: usize = itr.next().unwrap().parse().unwrap(); a.push((b - 30000 * c, i + 1)); } a.sort(); a.reverse(); if a[0].0 * 6 >= 3000000 { println!("YES"); for _ in 0..6 { println!("{}", a[0].1); } } else { println!("NO",); } }