This program takes a number N and prints whether it is a t-prime number or not.
We know that prime numbers are positive integers that have exactly two distinct positive divisors. Similarly, we'll call a positive integer n Т-prime, if n has exactly three distinct positive divisors. So we can find t-prime by brootforce easily but we have an efficient method which is explained below.
A number is t-prime if it satisfies the following conditions: (i) It is a perfect square. (ii) It's square root is a prime number.
- The input consists of a single line.
- There will be a single integer N.
A simple message saying its Magic Number or not.
167328
NO