#include int main() { int N, M; scanf("%d %d", &N, &M); printf("%d", N / M); N = N % M; N ^= M; M ^= N; N ^= M; while (M > 0) { printf(" %d", N / M); N = N % M; N ^= M; M ^= N; N ^= M; } printf("\n"); fflush(stdout); return 0; }