#include<bits/stdc++.h> using namespace std; int main(){ int m,n; cin>>m>>n; cout<<int(m/n)<<" "<<m-(m/n*n)<<endl; return 0; }