#include <iostream> #include <math.h> using namespace std; int main() { int n; cin >> n; int qw; for (int i = 1; i <= n; i++) { qw = sqrt(i); if (pow(qw,pow(qw,2))== i) cout << i << " "; } return 0; }