# your code goes here
divida = int(input())
maximo = int(input())
while divida > 0:
    print("(antes) {}".format(divida))
    if divida <= maximo:
        divida = 0
    else:
        divida -= maximo
    print("(depois) {}".format(divida))
