($n,$m)=glob<>;
while($m){
	push@a,int$n/$m;
	($n,$m)=($m,$n%$m);
}
print"@a";