#include <iostream>#include <cmath>using namespace std;
int main(){ int a[200], n; cin >> n; int d; for ( int i = 0; i < n; ++i) { cin >> a[i]; d = sqrt(a[i]); if ( a[i] == d * d ) cout << d << ' ' << a[i] << ' '; else cout << a[i] << ' '; } return 0;
}