#include <iomanip>
#include <iostream>
#include <cstdio>
//47!,48! WA
using namespace std;
int PR[ 168 ] = { 2 ,3 ,5 ,7 ,11 ,13 ,17 ,19 ,23 ,29 ,31 ,37 ,41 ,43 ,47 ,53 ,59 ,61 ,67 ,71 ,73 ,79 ,83 ,89 ,97 ,101 ,103 ,107 ,109 ,113 ,127 ,131 ,137 ,139 ,149 ,151 ,157 ,163 ,167 ,173 ,179 ,181 ,191 ,193 ,197 ,199 ,211 ,223 ,227 ,229 ,233 ,239 ,241 ,251 ,257 ,263 ,269 ,271 ,277 ,281 ,283 ,293 ,307 ,311 ,313 ,317 ,331 ,337 ,347 ,349 ,353 ,359 ,367 ,373 ,379 ,383 ,389 ,397 ,401 ,409 ,419 ,421 ,431 ,433 ,439 ,443 ,449 ,457 ,461 ,463 ,467 ,479 ,487 ,491 ,499 ,503 ,509 ,521 ,523 ,541 ,547 ,557 ,563 ,569 ,571 ,577 ,587 ,593 ,599 ,601 ,607 ,613 ,617 ,619 ,631 ,641 ,643 ,647 ,653 ,659 ,661 ,673 ,677 ,683 ,691 ,701 ,709 ,719 ,727 ,733 ,739 ,743 ,751 ,757 ,761 ,769 ,773 ,787 ,797 ,809 ,811 ,821 ,823 ,827 ,829 ,839 ,853 ,857 ,859 ,863 ,877 ,881 ,883 ,887 ,907 ,911 ,919 ,929 ,937 ,941 ,947 ,953 ,967 ,971 ,977 ,983 ,991 ,997 } ;
int AN[ 168 ] = { 0 } ;
int ana_std( int inn)
{
//int K= Prime.size();
int K= 168 ;
int ret= 0 ;
for ( int i= 0 ; PR[ i] <= inn && i< K; i++ )
{
int that= PR[ i] ;
while ( inn % that== 0 )
{
inn / = that;
AN[ i] + = 1 ;
if ( inn== 1 )
return ret;
}
}
if ( ret> 1 )
return ret;
else
return ( 1 ) ;
}
void ACM160( int N)
{
for ( int t= 0 ; t< 168 ; t++ )
{
AN[ t] = 0 ;
}
for ( int x= 2 ; x<= N; x++ )
{
ana_std( x) ;
}
cout << setw( 3 ) << setiosflags( ios:: fixed ) << N<< "! =" ;
//printf("%3d! = ",N);
for ( int i= 0 ; i< 168 ; i++ )
{
if ( AN[ i] > 0 )
{
cout << setw( 3 ) << setiosflags( ios:: fixed ) << AN[ i] ;
//printf("%3d",AN[i]);
if ( i== 14 && AN[ i+ 1 ] ! = 0 )
{
if ( N== 100 )
cout << endl<< " " ;
else
cout << endl<< " " ;
}
} else
{
cout << endl;
break ;
}
}
}
int main( )
{ int N;
while ( cin >> N)
{
if ( N>= 2 && N<= 100 )
{
ACM160( N) ;
} else if ( N== 1 )
{
cout << setw( 3 ) << setiosflags( ios:: fixed ) << N<< "! =" << endl;
//printf("%3d",N);
//printf("! =\n");
continue ;
}
else
break ;
}
//getchar();
return 0 ;
}
I2luY2x1ZGUgPGlvbWFuaXA+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPGNzdGRpbz4KLy80NyEsNDghIFdBCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBQUlsxNjhdPXsyLDMsNSw3LDExLDEzLDE3LDE5LDIzLDI5LDMxLDM3LDQxLDQzLDQ3LDUzLDU5LDYxLDY3LDcxLDczLDc5LDgzLDg5LDk3LDEwMSwxMDMsMTA3LDEwOSwxMTMsMTI3LDEzMSwxMzcsMTM5LDE0OSwxNTEsMTU3LDE2MywxNjcsMTczLDE3OSwxODEsMTkxLDE5MywxOTcsMTk5LDIxMSwyMjMsMjI3LDIyOSwyMzMsMjM5LDI0MSwyNTEsMjU3LDI2MywyNjksMjcxLDI3NywyODEsMjgzLDI5MywzMDcsMzExLDMxMywzMTcsMzMxLDMzNywzNDcsMzQ5LDM1MywzNTksMzY3LDM3MywzNzksMzgzLDM4OSwzOTcsNDAxLDQwOSw0MTksNDIxLDQzMSw0MzMsNDM5LDQ0Myw0NDksNDU3LDQ2MSw0NjMsNDY3LDQ3OSw0ODcsNDkxLDQ5OSw1MDMsNTA5LDUyMSw1MjMsNTQxLDU0Nyw1NTcsNTYzLDU2OSw1NzE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