#include <bits/stdc++.h>   using namespace std;   int res[1111];   bool sol(int d) {     int g = 1, e;     for (e = 2; e <= sqrt(d); e++) {       if (d % e == 0) {         while (d % e == 0) d /= e;         if (d != 1) {           g = 0;         }         break;       }     }     return g;   }   int main() {     int a, b, c, d, e, f, g, h;     scanf( %d , &a);     if (a < 2) {       printf( 0 n );       return 0;     }     for (d = 2, g = 0; d <= a; d++) {       if (sol(d)) {         res[g++] = d;       }     }     printf( %d n , g);     for (d = 0; d < g; d++) printf( %d%c , res[d], d != g - 1 ?     :   n );     return 0;   }   