QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 128 MB Total points: 100 Difficulty: [show]

#14760. Gym for beginners

Statistics

Bajtazar has been spending a lot of time at the local gym lately. He has access to an unlimited number of weights weighing 3 and 8 kilograms each. He would like to exercise with a load of $n$ kilograms. Is it possible for him to obtain such a load using the available weights?

Input

The first and only line of input contains a single integer $n$ ($1 \le n \le 10^9$).

Output

In the first and only line of output, print the word TAK (Yes) or NIE (No), indicating whether it is possible to obtain a load of $n$ kilograms using the available weights, or that it is not possible, respectively.

Examples

Input 1

19

Output 1

TAK

Note 1

$19 = 8 + 8 + 3$

Note

Sample tests: Test 0a is the test from the example above. Additionally: 0b: $n = 10$, answer: NIE. 0c: $n = 10^9$, answer: TAK, only 8 kg weights.

Subtasks

The test set is divided into the following subtasks. Tests for each subtask consist of one or more separate test groups.

Subtask Constraints Points
1 $n \le 24$, if it is possible to obtain a load of $n$ kilograms, it is possible using at most 3 weights 20
2 $n \le 1000$ 30
3 no additional constraints 50

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.