#include <stdio.h>
int main() {
int N, digit;
// Input the number
printf("Enter a natural number: ");
scanf("%d", &N);
// Process each digit
while (N > 0) {
digit = N % 10; // Extract the last digit
// Check if the digit is not a square of 2 (1 or 4)
if (digit != 1 && digit != 4) {
printf("%d ", digit); // Print the digit
}
N = N / 10; // Remove the last digit
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBOLCBkaWdpdDsKICAgIAogICAgLy8gSW5wdXQgdGhlIG51bWJlcgogICAgcHJpbnRmKCJFbnRlciBhIG5hdHVyYWwgbnVtYmVyOiAiKTsKICAgIHNjYW5mKCIlZCIsICZOKTsKICAgIAogICAgLy8gUHJvY2VzcyBlYWNoIGRpZ2l0CiAgICB3aGlsZSAoTiA+IDApIHsKICAgICAgICBkaWdpdCA9IE4gJSAxMDsgLy8gRXh0cmFjdCB0aGUgbGFzdCBkaWdpdAogICAgICAgIAogICAgICAgIC8vIENoZWNrIGlmIHRoZSBkaWdpdCBpcyBub3QgYSBzcXVhcmUgb2YgMiAoMSBvciA0KQogICAgICAgIGlmIChkaWdpdCAhPSAxICYmIGRpZ2l0ICE9IDQpIHsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLCBkaWdpdCk7IC8vIFByaW50IHRoZSBkaWdpdAogICAgICAgIH0KICAgICAgICAKICAgICAgICBOID0gTiAvIDEwOyAvLyBSZW1vdmUgdGhlIGxhc3QgZGlnaXQKICAgIH0KICAgIAogICAgcmV0dXJuIDA7Cn0=