#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define rep(i,n) for (int i = 0; i < (n); i++) #define all(v) v.begin(), v.end() const ll INF = 1001001001001001001; const ll MOD = 1000000007; const ll mod = 998244353; const int inf = 1 << 29; int main() { ll n, m; cin >> n >> m; while (n > 1) { cout << n / m << ' '; ll r = n % m; n = m; m = r; } return 0; }