#![allow(non_snake_case, unused_imports)] use std::collections::{HashMap, HashSet}; use proconio::{input, marker::Usize1, marker::Chars}; use itertools::Itertools; #[allow(unused_macros)] macro_rules! d { ( $( $x:expr ),* $(,)? ) => { eprintln!( concat!( $( stringify!($x), "={:?} " ),* ), $( $x ),* ); }; } #[allow(dead_code)] fn yn(b: bool) -> &'static str { if b { "Yes" } else { "No" } } fn main() { input! { N: usize, Q: usize, X: [i64; N], } let d: HashMap = X.iter().copied().collect::>() .into_iter() .enumerate() .map(|(i, x)| (x, i)) .collect(); let cnt = d.len() + N; if cnt > Q { println!("No"); return; } println!("Yes"); let mut used = HashSet::new(); for x in X { if !used.contains(&x) { println!("1 {} {}", d[&x]+1, x); used.insert(x); } println!("2 {}", d[&x]+1) } for _ in 0..Q-cnt { println!("1 1 1") } }