#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b>N>>M; set SE,T; for(int i=0;i>x; SE.insert(x); T.insert(x); } if(!SE.count(0)){ cout<<-1< ans; while(si(SE)){ ll x=*SE.begin(); ans.push_back(x); for(ll z=x;z<=M;z+=x){ if(!T.count(z)){ cout<<-1<