## LCC/Moose '20 Contest 4 J4 - Tea

View as PDF

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

MCPT is selling MCP Tea! They want to determine their total revenue if they set the price to . It is also known that the quantity of products sold is related to the price by the linear equation , where are integers. In addition, MCPT knows that the revenue for a price is given by .

MCPT wishes to know for different prices whether the price belongs to the part of the demand curve that is elastic or inelastic. A price belongs to the inelastic part if there exists a such that and , otherwise it is elastic. Can you help MCPT?

#### Input Specification

The first line will contain 4 integers .

The next lines will contain an integer .

It is guaranteed that and will not BOTH be zero.

#### Output Specification

On each line output elastic or inelastic if price belongs to the elastic or inelastic part of the curve.

#### Sample Input

4 1 1 5
1
2
3
4

#### Sample Output

inelastic
inelastic
elastic
elastic