public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
while((a > 0 && a < 10000) && (b > 0 && b < 10000)) {
System.out.println((a / b) + " " + (a % b));
break;
}
}
}