#include using namespace std; int main(){ int a,b; cin>>a>>b; if(__gcd(a,b)>1){ cout<<-1< s; for(int x=0;x<=b;x++){ for(int y=0;y<=a;y++){ int v=a*x+b*y; if(1<=v && v<=a*b){ s.insert(v); } } } cout<