HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Winner's Camp > problem:


04. 50649 - Puzzle

Guest
• Discussion of problem (1)

Volume problems

• 51004 - Word Search Game
• 01. 50722 - Scientist's problem
• 02. 50376 - Sequences
• 03. 50673 - DNA Testing
• 04. 50649 - Puzzle
• 05. 50713 - Castle and the girls
• 06. 50714 - The knight
• 07. 50715 - Zero Sum
• 08. 50370 - Number of rectangles in ...
• 09. 50716 - All Palindromes
• 10. 50475 - Voice advertising
• 11. 50476 - Meditation
• 12. 50723 - Tribonacci

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by: Ilir Capuni. Difficulty Alpha

Puzzle

Write a program that for a given integer n (1≤n ≤200,000) determines the integers a and b such that
  n = a*b*(a+b) or write "Impossible" if that is not possible.
Input
The first line contains a single number N where 2 < N < 100.

  Sample 1 Sample 1
Input 30 65
Output 1 5
2 3
3 2
5 1
impossible


Для отправки решений необходимо выполнить вход.

www.contester.ru