#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,s,y;
	cin>>a>>b;
	s=a/b;
	y=a-s*b;
	cout<<s<<" "<<y;
}

/**************************************************************
	Problem: 1026
	User: shiruoxi
	Language: C++
	Result: Accepted
	Time:14 ms
	Memory:2072 kb
****************************************************************/