#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f; //❄️
int main() {
    ios::sync_with_stdio(0); cin.tie(0); 
    int x, y; cin >> x >> y;
    cout << x / y << " " << x % y << '\n';
    return 0;
}