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