Problem list
Log in
#r03540 · CCC 2018 Junior

Telemarketer or not?

Bronze IV 2.0 s 256 MB

Here at the Concerned Citizens of Commerce (CCC), we have noted that telemarketers like to use seven-digit phone numbers where the last four digits have three properties. Looking just at the last four digits, these properties are:

  • the first of these four digits is an 8 or 9;

  • the last digit is an 8 or 9;

  • the second and third digits are the same.

For example, if the last four digits of the telephone number are 8229, 8338, or 9008, these are telemarketer numbers.

Write a program to decide if a telephone number is a telemarketer number or not, based on the last four digits. If the number is not a telemarketer number, we should answer the phone, and otherwise, we should ignore it.

Input

The input will be 4 lines where each line contains exactly one digit in the range from $0$ to $9$.

Output

Output either ignore if the number matches the pattern for a telemarketer number; otherwise, output answer.

Example 1

Input
9
6
6
8
Output
ignore

The first digit is $9$, the last digit is $8$, and the second and third digit are both $6$, so this is a telemarketer number.

Example 2

Input
5
6
6
8
Output
answer

The first digit is $5$, and so this is not a telemarketer number.

Source
CCC 2018 Junior
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code