#include <stdio.h>
using namespace std;
int main(){
int A,B;
scanf("%d %d ", &A, &B);
printf("%d\n",A*(B%10));
printf("%d\n",A*((B/10)%10));
printf("%d\n",A*(B/100));
printf("%d",A*B);
return 0;
}
#include <stdio.h>
using namespace std;
int main(){
int A,B;
scanf("%d %d ", &A, &B);
printf("%d\n",A*(B%10));
printf("%d\n",A*((B/10)%10));
printf("%d\n",A*(B/100));
printf("%d",A*B);
return 0;
}