#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    int quotient = a / b;
    int remainder = a % b;
    cout << quotient << " " << remainder << endl;
    return 0;
}    
/**************************************************************
	Problem: 1026
	User: fuyijun
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/