The task
Given a positive integer c
, output two integers a
and b
where a * b = c
and each a
and b
is closest to sqrt(c)
while still being integers.
Test cases
Input: 136
Output: 17 8
Input: 144
Output: 12 12
Input: 72
Output: 9 8
Input: 41
Output: 41 1
Input: 189
Output: 21 9
Rules
a
,b
andc
are all positive integers- You may give
a
andb
in any order, so for the first case an output of8 17
is also correct - This is code-golf, so lowest byte count wins!