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