Perl 5, 53 + 2 (-p
flag) = 55 bytes
Perl 5, 53 + 2 (-p
flag) = 55 bytes
$_="@{[map{$_,$n/$_.$/}grep!($n%$_),2..sqrt($n=$_)]}"
Ungolfed:
while (defined $_ = <>) {
$n = $_;
$_ = qq(@{[
map{ ($_, ($n / $_) . "\n") } grep { !($n % $_) } (2 .. sqrt($n))
]});
print($_);
}