#include using namespace std; int main(void){ int A,B; cin>>A>>B; int x=1; for(x=1;x<=100000;x++){ if(x%A==B%x){ cout<