#t229. 判断能否被 3, 5, 7 整除

判断能否被 3, 5, 7 整除

Divisibility by 3, 5, and 7

Problem Description

Given an integer, determine whether it is divisible by 33, 55, and 77, and output the following information:

  1. If it is divisible by all of 3,5,73, 5, 7 (output 3 5 7, with a single space between each number);
  2. If it is divisible by exactly two of them (output the two numbers, smaller first, larger second — e.g. 3 5 or 3 7 or 5 7, separated by spaces);
  3. If it is divisible by exactly one of them (output that divisor);
  4. If it is divisible by none of them, output the lowercase letter n.

Input Format

One line containing a single integer.

Output Format

One line containing the divisibility information as described above.

Sample Input

105

Sample Output

3 5 7

Hint

  • Three independent checks; output whichever condition(s) are satisfied (in the order 33, 55, 77).
  • When none is satisfied, output n itself — reread the statement to confirm.
  • Multiple numbers on the same line: build the spaces yourself.
  • Verify with the sample: 105 → 3 5 7.