dividend=int(input())
divisor=int(input())
quotient=dividend//divisor
remainder=dividend%divisor
print(str(dividend) + " = " + str(divisor) + " * " + str(quotient) + " + " + str(remainder))

dividend=int(input())
divisor=int(input())
quotient=dividend//divisor
remainder=dividend%divisor
print(str(dividend) + " = " + str(divisor) + " * " + str(quotient) + " + " + str(remainder))
