https://www.acmicpc.net/problem/2588
n=int(input()) m=int(input()) num=m%10 a=num*n m//=10 num=m%10 b=num*n m//=10 num=m%10 c=num*n sum=a+b*10+c*100 print(a) print(b) print(c) print(sum)