a, b = input().split(' ')

print((int(a)//int(b)), int(a)%int(b))

# /는 float //는 int

# data = list(map(int, input().split()))
# result = data[0] // data[1]
# left = data[0] % data[1]
# print(result, left)