//#pragma GCC target("avx2") //#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include using namespace std; using ll = long long; using pii = pair; using pll = pair; using pli = pair; #define AMARI 998244353 //#define AMARI 1000000007 #define el '\n' #define El '\n' #define YESNO(x) ((x) ? "Yes" : "No") #define YES YESNO(true) #define NO YESNO(false) #define REV_PRIORITY_QUEUE(tp) priority_queue,greater> #define EXIT_ANS(x) {cout << (x) << '\n'; return;} template void inline SORT(vector &v){sort(v.begin(),v.end()); return;} template void inline VEC_UNIQ(vector &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); return;} template T inline MAX(vector &v){return *max_element(v.begin(),v.end());} template T inline MIN(vector &v){return *min_element(v.begin(),v.end());} template T inline SUM(vector &v){T ans = 0; for(int i = 0; i < (int)v.size(); i++)ans += v[i]; return ans;} void inline TEST(void){cerr << "TEST" << endl; return;} vector> inline get_graph(int n,int m = -1,bool direct = false){ if(m == -1)m = n - 1; vector> g(n); while(m--){ int u,v; cin >> u >> v; u--; v--; g[u].push_back(v); if(!direct)g[v].push_back(u); } return g; } #define MULTI_TEST_CASE false void solve(void){ //問題を見たらまず「この問題設定から言えること」をいっぱい言う //よりシンプルな問題に言い換えられたら、言い換えた先の問題を自然言語ではっきりと書く //複数の解法のアイデアを思いついた時は全部メモしておく //g++ -D_GLIBCXX_DEBUG -Wall -O2 c.cpp -o o int n; cin >> n; int q; cin >> q; vector temp; vector vec; while(n--){ ll x; cin >> x; temp.push_back(x); vec.push_back(x); } VEC_UNIQ(temp); if((int)temp.size() + (int)vec.size() > q){ EXIT_ANS(NO); return; } int m = q - (int)vec.size() - (int)temp.size(); cout << YES << El; for(int i = 0; i < (int)temp.size(); i++){ cout << "1 "; cout << temp[i] << ' ' << temp[i] << el; } while(m--){ cout << "1 1 1" << el; } for(int i = 0; i < (int)vec.size(); i++){ cout << "2 " << vec[i] << el; } return; } void calc(void){ return; } signed main(void){ cin.tie(nullptr); ios::sync_with_stdio(false); calc(); int t = 1; if(MULTI_TEST_CASE)cin >> t; while(t--){ solve(); } return 0; }