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