Under construction

Still being built. Things may change

What Makes 2023 Special?

Time limit2sMemory limit1024 MB

Summary
Given a four-digit year N that is not a multiple of 100, check whether N+1 is divisible by the last two digits of N.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

The contest Good Bye, 2023! is held on December 31, 2023. Kipa was so happy that the contest was being held that he stared at 2023 and 2024 for a long time, and noticed that something about them was special.

That's right. 2024, the year after this one, is divisible by 23, the last two digits of this year. The next year like this will be 2029/2030, six years from now.

A positive integer NN is given. Write a program that determines whether years NN and N+1N+1 satisfy this condition.

Input

The first line contains the number of test cases TT.

Each of the next TT lines contains one test case. Each test case is a single line containing one positive integer NN.

Output

For each test case, print Good if N+1N+1 is divisible by the last two digits of NN, and Bye otherwise, one per line in order.

Constraints

  • 1≤T≤8 9101\le T\le 8\,910
  • 1 000≤N≤9 9991\,000\le N\le 9\,999
  • NN is not a multiple of 100.

Examples1

  1. Example 1

    Input
    3
    2023
    2024
    2029
    
    Expected output
    Good
    Bye
    Good