import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        String[] nums = str.split(" ");
        int a = Integer.parseInt(nums[0]);//string转int
        int b = Integer.parseInt(nums[1]);
        int quotient = a / b;
        int remainder = a % b;
        System.out.println(quotient + " " + remainder);
    }
}