In 1956 Arthur W. Anderson performed some experiments at the Oregon Agricultural Experiment Station (Corvallis, Oregon, US) to determine whether canned food could be sterilized using high doses of gamma radiation. A tin of meat was exposed to a dose of radiation that was thought to kill all known forms of life. After Anderson found out that the meat still spoiled after radiation, he managed to isolate a yet unknown bacterial species from the rotten meat.

The species was named Deinococcus radiodurans, a name derived from the Ancient Greek words δεινός (deinos) and κόκκος (kokkos) — meaning "terrible grain/berry" — and the Latin words radius and durare — meaning "surviving radiation". It is an polyextremophilic bacteria that is not only one of the most radiation-resistant organisms known, but it can also survive cold, dehydration, vacuum and acid. It has been listed as the world's toughest bacterium in The Guinness Book of World Records. As a consequence of its hardiness, it has been nicknamed Conan the Bacterium1.

Deinococcus radiodurans
A tetrad of Deinococcus radiodurans, also known as Conan the Bacterium.

In 2003 American scientists demonstrated that D. radiodurans could be used as a means of information storage that might survive nuclear catastrophes. They translated the song It's a Small World2 into a series of DNA segments 150 base pairs long, inserted these into the bacteria, and were able to retrieve them without errors 100 bacterial generations later.

Assignment

You are involved in a scientific study that investigates the possibilities to store all the world's knowledge into D. radiodurans, just in case humanity would cease to exist after a nuclear catastrophe. You have been able to grow a variant species in the lab whose cell division goes faster as the dose of radiation increases, and that stops growing as soon as radiation stops. For a given dose of radiation, you have determined that every second each cell divides itself into $$a$$ cells and that due to some abnormal effects of the radiation $$b$$ more cells are created. Thus, if at a given point in time there are $$x$$ cells in a test tube, one second later there are $$ax + b$$ cells in the test tube. You decide to set up two experiments to further investigate the properties of the new species.

At the beginning of the first experiment, there is a single cell in the test tube. Then you radiate the test tube during $$n$$ seconds. After you have stopped the radiation, you count $$z$$ cells in the test tube.

At the beginning of the second experiment, the test tube is sterilized and $$t$$ new cells are put into the test tube. The goal of this experiment is to determine whether these $$t$$ cells will divide independent of each other according to the procedure in the first experiment. If this is the case, the question that needs to be answered before running the experiment is how many seconds $$s$$ you will need to radiate the test tube to obtain at least $$z$$ cells in the test tube.

Say, for example, that $$a=3$$ and $$b = 1$$, and that we radiate the test tube for $$n = 3$$ seconds during the first experiment. In this case, the cells will grow each second as indicated in the second column of the table below. After three seconds, the test tube will contain $$z = 40$$ cells. If we start the second experiment with $$t = 5$$ cell in the test tube, these cells will grow each second as indicated in the third column of the table. After $$s = 2$$ seconds there will be exactly 49 cells in the test tube, which is larger than or equal to the number of cells $$z = 40$$ obtained after the first experiment.

second # cells (experiment 1) # cells (experiment 2)
0 1 5
1 4 16
2 13 49
3 40  

Input

Four integers $$a$$, $$b$$, $$n$$ and $$t \in \mathbb{N}_0$$, each on a separate line. The values $$a$$ and $$b$$ represent the parameters that determine cell division of the bacterial species. The value $$n$$ indicates the number of seconds the test tube is radiated during the first experiment. The value $$t$$ indicates the number of cells that are in the test tube at the start of the second experiment.

Output

For each experiment, a single line of output must be generated that indicates how many cells there are in the test tube at the end of the experiment, and how many seconds the test tube has been radiated during the experiment. For the first experiment, the number of seconds the test tube is radiated can be read from the input. For the second experiment, the initial number of cells in the test tube can be read from the input. Derive the exact formatting of the output from the example given below.

Example

This example corresponds to the one discussed in the introduction of this assignment.

Input:

3
1
3
5

Output:

experiment #1: 40 cells after 3 seconds
experiment #2: 49 cells after 2 seconds