#include<iostream> using namespace std; int main() { int n,m; cin>>m>>n; cout<<m/n<<" "<<m-(m/n)*n<<endl; }