题干:

You can't possibly imagine how cold our friends are this winter in Nvodsk! Two of them play the following game to warm up: initially a piece of paper has an integer q. During a move a player should write any integer number that is a non-trivialdivisor of the last written number. Then he should run this number of circles around the hotel. Let us remind you that a number's divisor is called non-trivial if it is different from one and from the divided number itself.

The first person who can't make a move wins as he continues to lie in his warm bed under three blankets while the other one keeps running. Determine which player wins considering that both players play optimally. If the first player wins, print any winning first move.

Input

The first line contains the only integer q (1 ≤ q ≤ 1013).

Please do not use the %lld specificator to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specificator.

Output

In the first line print the number of the winning player (1 or 2). If the first player wins then the second line should contain another integer — his first move (if the first player can't even make the first move, print 0). If there are multiple solutions, print any of them.

Examples

Input

6

Output

2

Input

30

Output

1
6

Input

1

Output

1
0

Note

Number 6 has only two non-trivial divisors: 2 and 3. It is impossible to make a move after the numbers 2 and 3 are written, so both of them are winning, thus, number 6is the losing number. A player can make a move and write number 6 after number 30; 6, as we know, is a losing number. Thus, this move will bring us the victory.

题目大意:

  博弈问题,题目给了我们一个数,然后让俩个人轮换操作:可以把这个数换成他的非平凡因数(但是不能是1和它本身),如果那个人不能操作了,那么他就胜利。第一个人胜利,则输出它的第一场操作。每个人都希望自己胜利,也就是不会失误。

解题报告:

   我们想要胜利,也就是想让自己不能操作,也就是如果我制造出一个只有两个质数的数,这样对手只能取走其中一个,那么我们走不动了,我们就赢了。所以我们面对一个数,我们的必败态就是,它是由两个素数组成的。所以我们对n做唯一性分解这个题就做完了。再看一眼数据范围,n可以等于1,所以加个特判。

AC代码:

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
#include<set>
#include<string>
#include<cmath>
#include<cstring>
#define ll long long
#define pb push_back
#define pm make_pair
#define fi first
#define se second
using namespace std;
const int MAX = 2e5 + 5;
ll n;
ll biao[MAX];
int cnt;
bool is(ll x) {
	
	for(ll i = 2; i*i<=x; i++) {
		if(x%i==0) return 0;
	}
	return 1 ;
}
void fenjie(ll x) {
	for(ll i = 2; i*i<=x; i++) {
		if(x%i == 0 && is(i)) {
			//biao[++cnt] = i;
			while(x%i==0) biao[++cnt]=i,x/=i;
		}
		if(cnt>=2) break;
	}
	
	if(x>1) biao[++cnt]=x;
}
int main()
{
	cin>>n;
	if(n==1 || is(n)) {
		puts("1");
		puts("0");return 0 ;
	}
	fenjie(n);
	if(cnt == 2 && biao[1]*biao[2] == n) {
		puts("2");
	}
	else {
		puts("1");
		printf("%lld\n",biao[1]*biao[2]);
	}
	return 0 ;
 }