#include using namespace std; #define rep(i,n) for(int i=0;i>n>>m; if(n%m==0){ cout<ans; int amari=0; while(1){ ans.push_back(n/m); amari=n%m; if(amari==1){ ans.push_back(m); break; } n=m; m=amari; } rep(i,ans.size()){ if(i != 0) cout<<" "; cout<