#include <iostream>
#include<cmath>
#include <map>
#include <vector>
using namespace std;
int main() {
int t;std::cin >> t;
int n;std::cin >> n;
int arr[n+1];
for(int i=0 ; i<=n ; i++)arr[i]=1;
for(int i=2 ; i<=sqrt(n) ; i++){
if(arr[i]==1){
for(int j=2*i ; j<=n ; j+=i){
if(arr[j]==1){
int k=j/i;
arr[j]=j/i;}
}
}
}
/*for(int i=0 ; i<n ; i++){
cout<<arr[i]<<" ";
}cout<<endl;*/
multimap<int,int>tej ;
int max=-1;
for(int i=1 ; i<=n ; i++){
tej.insert(make_pair(arr[i],i));
//tej[arr[i]]=i;
if(max<arr[i]){
max=arr[i];
}
}
std::cout << max << std::endl;
int current =1;
std::vector<int>hello;
for(auto it=tej.begin() ; it!=tej.end() ; it++){
if(it->first!=current){
cout<<hello.size()<<" ";
for(int i=0 ; i<hello.size() ; i++){
cout<<hello[i]<<" ";
}
cout<<"\n";
hello.clear();
current++;
}
hello.push_back(it->second);
}
cout<<hello.size()<<" ";
for(int i=0 ; i<hello.size() ; i++){
cout<<hello[i]<<" ";
}
cout<<"\n";
return 0;
}
HEY i did this but its giving wrong answer… could any one plz, tell which test case i am missing
plx
zzzzz