Under construction

Still being built. Things may change

Lottery Failure

Time limit0.5sMemory limit1024 MB

Summary
For each integer of up to 30 digits until 0, print PREMIADO if it is a multiple of 42, otherwise print TENTE NOVAMENTE.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Many people dream of making easy money. Some try to do it through the lottery, buying scratch cards and tickets for multimillion-dollar draws.

Gilmar, a clever young man, decided to use his math skills to improve his odds in these games of chance. He bought several scratch cards of the same type and studied them until he noticed a curious property: each card had a printed identifier number that showed its chances of winning.

Out of every 10 cards he bought at the stand, about 1 or 2 came with a prize of some kind: at least one free scratch card, or a small cash prize. When he applied his method to choose which cards to buy, he found that out of every 10 cards, on average 8 contained a prize!

The task is too tedious to do by hand, so he asked you, a friend of long standing, to write a program that, given a card's identifier number, says whether it belongs to the set of cards with the highest chance of a prize. The trick is to look for cards whose identifier is a multiple of 42. Are you able to help your friend with this?

Input

The input consists of several test cases, one per line. Each test case contains an integer nn of up to 30 decimal digits.

The input ends with n=0n = 0, which is not processed.

Output

For each test case, print one line. If the card's identifier is a multiple of 42, print "PREMIADO". Otherwise, print "TENTE NOVAMENTE".

Examples1

  1. Example 1

    Input
    42
    17283940536172938433
    17283940536172938432
    10000000000000000000
    0
    
    Expected output
    PREMIADO
    TENTE NOVAMENTE
    PREMIADO
    TENTE NOVAMENTE