#include <iostream>
#include <cmath> 

using namespace std;
typedef unsigned long long int ullong;

bool testSqure1(ullong x) {
	double a = sqrt(x);
	return (int)a == a;
}

bool testSqure2(ullong x) {
	ullong a = sqrt(x);
	return a*a==x;
}


int main() {
	ullong x;
	while (cin >> x) {
		cout << x << " " << x*x << " " << testSqure1(x*x) << " " << testSqure2(x*x) << endl; 
	}
	return 0;
}