Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A positive numbers consider as \"Prime Relative\" if that number only remains 0

ID: 3627929 • Letter: A

Question

A positive numbers consider as "Prime Relative" if that number only remains 0 if: divided by 1, divided by itself; and divided by at most two other positive numbers.

Mr. D give you T(1<=T<=8)of number, of integer N (1<=N<=1000000000). Please consider that N is " Prime Relative" or not.

Input format:
First line contanied an integer of T. The next T line contained each integer of N.
Output format:
T of line, each contained "YES" if n is "Prime Relative", or "NOT" if not.

input example:
3
17
51
52
output example:
YES
YES
NOT

Note:
the factor of 51 are 1,3,17,and 51
factor of 52 are 1,2,4,13,26,52,
then 51 is "prime relative"
and 52 is not.

as that kind of definition set, the prime number is also "Prime Relative"

(in Pascal Programming language)

Explanation / Answer

According to wiki answers: Relative prime: two integers are termed relative prime if the only common factor between them is 1. any integer can be broken down into certain multiples of prime numbers. this is called prime factorization. When you prime factorize two integers and the only common number is 1,then the two integers are relative prime. for ex. 18 = 2 x 3 x 3 35 = 7 x 5 so 18 and 35 are relative primes. 18 = 2 x 3 x 3 21 = 3 x 7 3 is common, so 18 and 21 are not relative prime. Two integers are said to be relatively prime, or coprime if they share no common positive factor other than 1. For example, the numbers 6 and 35 are relatively prime because they share no common factors. Read more: http://wiki.answers.com/Q/What_is_a_relative_prime_number#ixzz1V7U1AeB7 your two numbers are
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote