How can this be made to do fewer calculations? It is very inefficient with large numbers
<pre><code>num = input ()
fact = 0
while fact != num:
     fact = fact + 1
     rem = num % fact
     if rem == 0:
          print fact
</code></pre>
