#include <bits/stdc++.h>
using namespace std;
int main(){
	int m,n,b,y;
	cin>>m>>n;
	b=m/n;
	y=m%n;
	cout<<b<<" "<<y;
}
/**************************************************************
	Problem: 1311
	User: tonghuatao
	Language: C++
	Result: Accepted
	Time:21 ms
	Memory:2072 kb
****************************************************************/