#C5944. Maximize Flowers

    ID: 49649 Type: Default 1000ms 256MiB

Maximize Flowers

Maximize Flowers

Jack wants to maximize the number of flowers he can receive by purchasing one packet of plants. There are two types of plants available:

  • Roses: Each rose plant produces P flowers and one packet contains 3 plants. Thus, the total number of flowers obtained from roses is given by the formula: \(3 \times P\).
  • Tulips: Each tulip plant produces Q flowers and one packet contains 4 plants. Thus, the total number of flowers obtained from tulips is given by the formula: \(4 \times Q\).

Jack is allowed to purchase exactly one packet of either roses or tulips. Your task is to help him decide which packet to buy in order to maximize the number of flowers. Print Roses if the packet of roses produces more flowers, Tulips if the packet of tulips produces more flowers, and Either if both packets produce the same number of flowers.

inputFormat

The input is read from standard input (stdin) and has the following format:

  • The first line contains a single integer \(T\), the number of test cases.
  • Each of the next \(T\) lines contains two space-separated integers \(P\) and \(Q\), where \(P\) is the number of flowers produced by each rose plant and \(Q\) is the number of flowers produced by each tulip plant.

outputFormat

For each test case, print a single line to standard output (stdout) containing one of the following words (case insensitive):

  • Roses if \(3 \times P > 4 \times Q\).
  • Tulips if \(3 \times P < 4 \times Q\).
  • Either if \(3 \times P = 4 \times Q\).
## sample
3
2 2
3 1
4 3
Tulips

Roses Either

</p>