#include<iostream> #include<cstdio> #include<cmath> using namespace std; typedef long long ll; int main() { ll n; while(~scanf("%lld",&n)&&n) { if(n<0) //将前缀提前输出 { n=-n; cout<<"-"<<n<<" = -1 x "; } else cout<<n<<" = "; ll k=sqrt(n); for(ll i=2;i<=k;i++) { if(n%i==0) { n/=i; cout<<i<<" x "; //输出的i为可以的最小因子 i=1; k=sqrt(n); } } cout<<n<<endl; } return 0; }