Timmy is learning about function transformations! For a function , is the graph of , but
- Vertically stretched by a factor of
- Horizontally compressed by a factor of
- Horizontally translated by units right
- Vertically translated units up
For this problem, you can assume that , , and are all nonnegative integers, and is a positive integer. Additionally, the numbers will always be present (even if they are redundant, such as when ).
Can you help Timmy with his homework?
Constraints
Input Specification
One line with one string, a function of the form
Output Specification
4 lines of the following form:
Vertically stretched by a factor of [a]
Horizontally compressed by a factor of 1/[k]
Horizontally translated by [d] units right
Vertically translated [c] units up
Where each square bracket ([n]
) means that the number n
replaces the bracket (we do not include the square brackets)
Sample Input
10f(3(x-4))+5
Sample Output
Vertically stretched by a factor of 10
Horizontally compressed by a factor of 1/3
Horizontally translated by 4 units right
Vertically translated 5 units up
Comments