#include<bits/stdc++.h>
 using namespace std;
 int main(){
    int a,b,h=0,y=0;
    cin>>a>>b;
     h=a/b;
     y=a-b*h; 
     cout<<h<<' '<<y; 
 }
/**************************************************************
	Problem: 1026
	User: huanghengyi
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/