QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 64 MB Points totaux : 10

#6013. Second numbers

Statistiques

In mathematics, the definition of prime numbers is widely known. These are natural numbers that have exactly two distinct divisors: one and themselves. The smallest prime numbers are 2, 3, 5, and 7.

Jasio learned this definition in math class and immediately created a new one. A natural number is a "second" number if it has at least two digits and its decimal representation can be obtained by writing two prime numbers next to each other. Neither of these numbers can have leading zeros in their representation.

For example, the number 232 is a "second" number because it is a combination of the representations of two prime numbers: 23 and 2. On the other hand, 2017 is not a "second" number—it cannot be created by writing two prime numbers next to each other without leading zeros.

Your task is to check whether the given input number is a "second" number.

Input

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

Output

Output a single word to standard output: TAK or NIE, depending on whether the number $n$ is a "second" number or not.

Examples

Input 1

232

Output 1

TAK

Input 2

2017

Output 2

NIE

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.