#include<stdio.h>
#include<math.h>
int main(){
int num;
scanf("%d",&num);
int arr[5];
arr[0]=num/10000;
arr[1]=num/1000%10;
arr[2]=num/100%10;
arr[3]=num/10%10;
arr[4]=num%10;
int i=0;
while(arr[i]==0){
i++;
}
printf("%d\n",5-i);
for(int k=0;k<5-i;k++){
arr[k]=arr[k+i];
}
for(int j=0;j<5-i;j++){
printf("%d ",arr[j]);
;
}
printf("\n");
int sum_number=0;
for(int num=0;num<5-i;num++){
sum_number+=arr[num]*pow(10,num);
}
printf("%d",sum_number);
return 0;
}