N, Q = map(int, input().split(' ')) X = [int(input()) for _ in range(N)] def dual_query(): a = set() query = [] c = 0 for i in X: if i in a: query.append((2, i)) c += 1 else: query.append((1, i, i)) query.append((2, i)) a.add(i) c += 2 if c > Q: return print('No') while c < Q: query.append((1, 1, 1)) c += 1 print('Yes') for q in query: print(*q) dual_query()