Ticker

6/recent/ticker-posts

Header Ads Widget

Responsive Advertisement

Count The Factor


The factorial of a non-negative integer N, denoted by N!, is the product of all positive integers less than and equal toN.
Factorial of any number can be represented in simplest form of its prime factors. 
e.g. 4!=4*3*2*1= 23*31
Factorials can also be specified by the number of times each prime factors occurs in it, thus 24 could be specified as (3 1) meaning 3 twos, 1 three.

Write a program that will take an integer as input and give output as the following.

Input:

Input will be a positive Integer N where N>1.

Line 1

N,where N is any integer.



Output:

Output will show a series consists of the number of times each prime factor appears after the factorization of N! separated by spaces.

Line 1


For Valid Input,print

L,where L is the series consists of the number of times each prime factor appears after the factorization of N! separated by spaces.For Invalid Input,print

Invalid Input


Sample Test Cases:

SNo.

Input

Output

1


6

4 2 1

2


a

Invalid Input

2


-5

Invalid Input


Post a Comment

0 Comments