int n = 0;
int aa[1000];
int fun()
{
int i = 1;
int j = 0;
while ((j = (i++) * 7) < 1000)
{
if( (j % 11) != 0 )
aa[n++] = j;
j = j + (4*(i - 1));
if( (j < 1000) && (j % 7 != 0) )
aa[n++] = j;
}
return n;
}
int main(int argc, char*[])
{
printf("%d\n",fun());
for (int i = 0 ; i < n ; ++i)
{
printf("%d\t",aa[i]);
}
printf("\n");
return 0;
}