#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,q; cin>>n>>q; VV ANS; map m; int now=1; V X(n); rep(i,n){ int x; cin>>x; X[i]=x; if(!m.contains(x)) m[x]=now++; } for(auto [a,b]:m){ V A(3); A[0]=1,A[1]=b,A[2]=a; ANS.push_back(A); } rep(i,n){ V A(2); A[0]=2,A[1]=m[X[i]]; ANS.push_back(A); } int a=ANS.size(); if(a>q) cout<<"No"<<'\n'; else{ rep(i,q-a){ V A(3); A[0]=1,A[1]=1,A[2]=1; ANS.push_back(A); } cout<<"Yes"<<'\n'; rep(i,q){ int b=ANS[i].size(); rep(j,b){ if(j) cout<<" "; cout<