#include <stdio.h>
int main() {
int alvqntoffood, messcnt, packets_per_mess, remaining_packets;
// Input the number of food packets and the number of messes
scanf("%d %d", &alvqntoffood, &messcnt);
// Calculate the number of packets per mess
packets_per_mess = alvqntoffood / messcnt;
// Calculate the remaining packets after equal distribution
remaining_packets = alvqntoffood % messcnt;
// Output the results
printf("%d %d\n", packets_per_mess, remaining_packets);
return 0;
}