import java.math.BigInteger;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
BigInteger bi=new BigInteger(in.next());
BigInteger a=new BigInteger(in.next());
System.out.print(bi.divide(a)+" ");
System.out.println(bi.mod(a));
}
}