# https://www.hackerrank.com/challenges/python-mod-divmod/problem


a, b = int(input()), int(input())
# 177
# 10

print(a // b, a % b, divmod(a, b), sep="\n")
# 17
# 7
# (17, 7)

# https://www.hackerrank.com/challenges/python-mod-divmod/problem


a, b = int(input()), int(input())
# 177
# 10

print(a // b, a % b, divmod(a, b), sep="\n")
# 17
# 7
# (17, 7)

# https://www.hackerrank.com/challenges/python-mod-divmod/problem # 177 # 10 # 17 # 7 # (17, 7)