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