main(n,m,r){scanf("%d%d",&n,&m);while(m){r=n%m;printf("%d ",n/m);n=m;m=r;}}