#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n, q; cin >> n >> q; vector a(n); rep(i, n) cin >> a[i]; int cnt = 0; set st; st.insert(0); rep(i, n) { if (!st.contains(a[i])) ++cnt, st.insert(a[i]); ++cnt; } if (cnt > q) { cout << "No" << '\n'; return 0; } cout << "Yes" << '\n'; st.erase(0); map mp; int idx = 0; for (int x : st) mp[x] = idx++; for (auto [k, v] : mp) cout << 1 << ' ' << v + 1 << ' ' << k << '\n'; mp[0] = idx++; rep(i, n) cout << 2 << ' ' << mp[a[i]] + 1 << '\n'; rep(_, q - cnt) cout << 1 << ' ' << 1 << ' ' << 0 << '\n'; return 0; }