Олимпиадный тренинг

Задача 38760. Apple pie


Задача

Темы:
Mikhail found out that his mother wants to bake an apple pie. To do this, my mother prepared a rectangular shape n × m. She also took a special round knife to cut apples of the same shape and size k. Being a good mathematician, Mikhail was able to immediately tell his mother how many blanks would fit in one layer in the prepared form.
After the apple blanks were placed in a mold, Mikhail's mother decided to experiment and add plums to the apples. All the plums they had were the same size, and each of them could fit perfectly between four apple blanks (see picture). Mom asked Mikhail to calculate how much drain would be needed in this case, and he immediately answered
to this question. Think about the formulas Mikhail used to count the number of apples and plums in a pie mold.
The answer to this problem is two lines, each of which contains one expression. The first — this is the formula for counting the number of apple blanks, the second — formula
counting the number of blanks plums. Expressions can contain integers, variables n, m and k (written in English letters), addition operations (denoted by +), subtractions (denoted by -), multiplications (denoted by *), divisions (denoted by /), and parentheses. The  2n notation for the product of the number 2 and the variable n is incorrect, you need to write 2*n.
If you do not know some formula, instead of it you should write the number "0" (without quotes). 
An example of a correct response form:
(n + m − 1) ∗ k+n
(n ∗ 21) − (m+k)

It is guaranteed that n, m, k — natural numbers, n and m are divisible by k.
This is how a form filled with twelve apples and six plums looks like.