#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: linmiaoling
	Language: C++
	Result: Accepted
	Time:10 ms
	Memory:2072 kb
****************************************************************/