#include using namespace std; using pii = pair; using ll = long long; using pll = pair; int pi = 1; map m; vector v; set s; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, q; cin >> n >> q; for (int i = 0; i < n; i++) { int x; cin >> x; v.push_back(x); s.insert(x); } if (s.size()*2 <= q) { cout << "Yes\n"; } else { cout << "No\n"; return 0; } for (int i = 0; i < n; i++) { int x = v[i]; if (!m.count(x)) { cout << "1 " << pi << " " << x << "\n"; m[x] = pi++; q--; } cout << "2 " << m[x] << "\n"; q--; } while (q--) cout << "1 1 1\n"; }