#include #include #include #include using namespace std; int gcd(int x,int y){return y?gcd(y,x%y):x;} int main(){ int N,K; scanf("%d%d",&N,&K); vectorshuf(N); iota(shuf.begin(),shuf.end(),0); vectororig=shuf; for(int i=0;iz(N); for(int i=0;ielem(N); for(int i=0;i0;i--){ elem[i-1]=elem[i-1]/gcd(elem[i-1],elem[i])*elem[i]; } if(elem[0]<=N){ printf("%d\n",elem[0]);continue; } fail: puts("-1"); } }