#T539. 判断能否被3.5.7整除

判断能否被3.5.7整除

Description

Given an integer, determine whether it is divisible by 3, 5, and 7, and output the following information:

  1. If it is divisible by 3, 5, and 7 simultaneously (output "3 5 7" with a space between each number);
  2. If it is divisible by only two of the numbers (output the two numbers in ascending order, e.g., "3 5" or "3 7" or "5 7", separated by a space);
  3. If it is divisible by only one of the numbers (output that divisor);
  4. If it is not divisible by any of the numbers, output the lowercase letter 'n' (without the single quotes).

Input Format

Input one line containing an integer.

Output Format

Output one line indicating the divisibility of the integer by 3, 5, and 7 as per the description.

105
3 5 7

来源

CodesOnline