a = int(input())
b = int(input())

print(a//b)    # for quotient
print(a%b)      # for remainder
print(divmod(a, b)) #for a tuple of quotient and remainder
a = int(input())
b = int(input())

print(a//b)    # for quotient
print(a%b)      # for remainder
print(divmod(a, b)) #for a tuple of quotient and remainder
# for quotient # for remainder #for a tuple of quotient and remainder