This page is still under construction.

Parts of this page are still being built. What you see may change.

Painted Numbers

Time limit1sMemory limit128 MB

Summary
Decide the red or blue color of each positive rational when adding 1 flips the color, reciprocals share it, and 1 is red.
Level

Medium7 of 10

Topics
Number theory, Math
Solved
No attempts yet

Problem

Every positive rational number has been painted with one of two colors, red or blue, so that:

  • two numbers that differ by exactly 11 are painted different colors,
  • two numbers that are reciprocals of each other are painted the same color,
  • the number 11 is painted red.

Determine the color of a given number.

Input

The first line contains a natural number ZZ (1≤Z≤201 \le Z \le 20), the number of test cases.

Each of the next ZZ lines contains one positive rational number in the form a / b, where aa and bb are positive integers (1≤a,b≤1091 \le a, b \le 10^9).

Output

For each test case, print the color of the given number on its own line: czerwony for red, or niebieski for blue.

Hint

4/2=2=1+14 / 2 = 2 = 1 + 1, so its color must be the opposite of the color of 11.

1/31 / 3 is the reciprocal of 33, so they share a color, and 3=1+23 = 1 + 2, so that color must be the opposite of the color of 22.

Examples2

  1. Example 1

    Input
    3
    4 / 2
    1 / 3
    101 / 171
    
    Expected output
    niebieski
    czerwony
    czerwony
    
  2. Example 2

    Input
    1
    1 / 1
    
    Expected output
    czerwony