#include <iostream>
#include <cstdint>
#include <cmath>

int main(){
	double a = 0, b = 0, c = 0, d = 0, x = 0;
	double X = 0,V=0;
	std::uint64_t N = 1000;
	std::uint64_t M = 5;

	for (std::uint64_t i = 0; i < N; i++){
		a = std::pow(i, M);
		for (std::uint64_t j = i + 1; j < N; j++){
			b = std::pow(j, M);
			for (std::uint64_t k = j + 1; k < N; k++){
				c = std::pow(k, M);
				for (std::uint64_t l = k + 1; l < N; l++){
					d = std::pow(l, M);
					x = a + b + c + d;
					X = std::pow(x, 1 / static_cast<double>(M));
					V = std::modf(X, &V);
					if (!std::modf(X,&V))std::cout << i << ' ' << j << ' ' << k << ' ' << l << ' ' << X << std::endl;
				}
			}
		}
	}
}