#include<iostream>
using namespace std;
double faktorial(int n)
{
if (n == 0) return 1;
return n*faktorial(n - 1);
}
double isSquare(float n)
{
double k;
if (n == 0) return 0;
k = sqrt(n);
if (k == (int)k) return 1;
else return 0;
}
int main()
{
int n,temp;
double f, s = 1;
bool flug = true;
cin >> n;
for (size_t i = 1; i <= n; i++)
{
s *= faktorial(i);
}
cout << isSquare(s) << endl;
for (size_t i = 0; i < n; i++)
{
temp = n - i;
f = s / temp;
if (isSquare(f))
{
cout << temp << endl;
flug = false;
break;
}
}
if (flug) cout << "Not found "<<endl;
system("pause");
return 0;
}