#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) void solve() { ll n, q; cin >> n >> q; map mp; vector> ans; ll p = 1; rep(i, n) { ll x; cin >> x; if (mp.count(x) == 1) { ans.emplace_back(2, mp[x], -1); } else { mp[x] = p; ans.emplace_back(1, p, x); ans.emplace_back(2, p, -1); p++; } } if (q < ll(ans.size())) { cout << "No\n"; return; } while (ll(ans.size()) < q) { ans.emplace_back(1, p, 1); } cout << "Yes\n"; for (const auto &[t, p, x] : ans) { cout << t << ' ' << p; if (t == 1) cout << ' ' << x; cout << '\n'; } } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); int T = 1; for (int t = 0; t < T; t++) { solve(); } return 0; }